Re: [Modeling-users] fetching problem
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-02-20 18:02:39
|
Another quick answer: > > But I can't fetch any value, the following code : > > > > from Modeling.EditingContext import EditingContext > > from Modeling.FetchSpecification import FetchSpecification > > from Autogen.PROJECT import PROJECT >=20 > I found the problem, the import statement was edited for the email, it > really was from core.utils.Autogen import PROJECT. The if I flatten > my hierarchy a bit to REALLY have from Autogen.PROJECT import PROJECT, > it works perfectly. >=20 > Do you plan to support sub-package import in future releases ? Okay, I think I see your problem: you generated the python code templates with the model you supplied in your previous mail, than you put the generated package in package core.utils. If true, the only thing you need to change is attribute 'packageName' of xml-entity <model>: change it from 'Autogen' to 'core.utils.Autogen', and you'll see that your entities can now find their own classes (you'll probably want to modify both model_Autogen.xml and model_Autogen.py) BTW this question is addressed in section 2.6 / FAQ of the User's Guide ;) but if you read it and did not understand that way, please tell me However, you did find a bug here: it shouldn't raise UnboundLocalError but at least something more informative! Could you please take some time and fill in a bug report in sourceforge's tracker? Cheers, -- S=E9bastien. |