Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrea 24 posts 44 karma points
    Jan 03, 2011 @ 16:02
    Andrea
    0

    Umbraco 4.5.2 IronPython - Media error

    I have an error: System.MissingMemberException: 'NoneType' object has no attribute 'Value'  using these script

    import clr
    clr.AddReference('cms')
    clr.AddReference('businesslogic')

    from umbraco.presentation.nodeFactory import Node
    from umbraco import library
    from umbraco.cms.businesslogic import media
    .............

    imageId = childNode.GetProperty("img").Value
    file = media.Media(int(imageId))
    url = file.getProperty("UmbracoFile").Value

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 03, 2011 @ 23:44
    Aaron Powell
    0

    Is UmbracoFile the alias? Umbraco should default the first character to lowercase, resulting in umbracoFile

  • Andrea 24 posts 44 karma points
    Jan 05, 2011 @ 15:29
    Andrea
    0

    Thank you the error was the alias first character.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft