On Tue, 2003-02-18 at 05:15, Bogdan wrote:
> I have Webaware8
> I have error
> File "/var/Webware/WebKit/averest/index.py", line 35, in writeHTML
> File "/var/Webware/WebKit/averest/index.py", line 85, in ViewCustomers
> File "./MiddleKit/Core/ModelUser.py", line 41, in readModelFileNamed
> File "./MiddleKit/Core/Model.py", line 64, in read
> File "./MiddleKit/Core/Model.py", line 118, in awakeFromRead
> File "./MiddleKit/Core/Klasses.py", line 101, in awakeFromRead
> File "./MiddleKit/Core/Klass.py", line 71, in awakeFromRead
> File "./MiddleKit/Core/Klass.py", line 261, in pyClass
> self._pyClass =
> self._klassContainer._model.pyClassForName(self.name()) File
> "./MiddleKit/Core/Model.py", line 250, in pyClassForName exec 'import
> %s%s as module' % (pkg, name) in results File "<string>", line 1, in ?
> ImportError: No module named Customer
> My code is:
> con = MySQLObjectStore( user='root',passwd='' )
> ObjLists = con.fetchObjectsOfClass('Customer')
> This code pefectly working outside webware app!
MiddleKit is not finding your class files.
In the MiddleKit setting file (probably in Billing.mkmodel/Settings.conf
for you), what is the 'Package' setting set to?
The default setting is "Middle", so MiddleKit expects to be able to
It looks like the directory in which you've generated your files is
called Billing, so you'll probably want to change the setting to
"Billing", and then make sure /var/Webware/WebKit/averest is in the
If you're doing serious work, though, I would strongly advise against
putting your source files in the Webware source tree. Instead, use
'MakeAppWorkDir.py', as described in the documentation, to create a
working directory for your code.
hope this helps,
Jason D. Hildebrand