Hi, I'm using WebKit 0.81 on Debian Linux. It works fine with Python up to 2.2.2, but I get an error *in the generated Python code* from MiddleKit with 2.3 on every MiddleKit Object that has an attribute of type datetime. I'm using mx.DateTime, the generated code works fine with 2.2.2.

The example below includes error message and a code snippet from the generated Python file.

The code gets generated in MiddleKit/Design/PythonGenerator.py - I could work around the type checking by commenting out some code there, but I lack understanding for what goes wrong. Any clues?

MV


>>> users=store.fetchObjectsOfClass("User")


Traceback (most recent call last):
File "<pyshell#28>", line 1, in -toplevel-
g=store.fetchObjectsOfClass("User")
File "MiddleKit/Run/SQLObjectStore.py", line 298, in fetchObjectsOfClass
File "MiddleKit/Run/MiddleObject.py", line 90, in readStoreData
File "/usr/local/bottino/src/Proxy/GeneratedPy/GenUser.py", line 205, in setLastlogin
raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value))
TypeError: expecting datetime type, but got value datetime.datetime(2004, 12, 10, 0, 32, 21) of type <type 'datetime.datetime'> instead



---------------------------- snippet from File "/usr/local/bottino/src/Proxy/GeneratedPy/GenUser.py"



def setLastlogin(self, value):
# have DateTime
if value is not None:
if type(value) is type(''):
value = DateTime.DateTimeFrom(value)
if type(value) is not DateTime.DateTimeType:
error here --> raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value))


                # set the attribute
        



>>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to