Copied to clipboard

Flag this post as spam?

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


  • Pickels 75 posts 108 karma points
    Aug 02, 2010 @ 19:18
    Pickels
    0

    Python: umbraco.cms.businesslogic.media

    Hello Umbraconians,

    I am getting an error when I try to import Media into my Python macro.

    from umbraco.cms.businesslogic.media import Media

    The error I get is: No module named businesslogic. In normal Python I mostly get this error when the Module isn't in the Path. I could use GetMedia but it returns XML which is was trying to avoid.

    So if anybody could help me I would appreciate it.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Aug 02, 2010 @ 19:57
    Lee Kelleher
    0

    I'm not Python developer, but I thought I'd test out a couple of things.  As far as I can tell, you can only import classes/objects from the "umbraco.dll" assembly.

    Trying to import anything from "businesslogic.dll" or "cms.dll" just throws an exception.

    Not sure if this is a bug in Umbraco - or I'm doing something wrong?

    Cheers, Lee.

  • Pickels 75 posts 108 karma points
    Aug 02, 2010 @ 21:17
    Pickels
    0

    I have no IronPython experience my self so I am not sure if you have to do something special to make them accessible in IronPython.

Please Sign in or register to post replies

Write your reply to:

Draft