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.
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?
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.
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.
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.
is working on a reply...