Hi all,
whenever I try to reload a module where I have a class derived from SQLObject
defined I get:
class ConfigItem(SQLObject):
File "C:\PROGRA~1\Python-2.3\lib\site-packages\SQLObject\SQLObject.py", line
152, in __new__
assert not classRegistry.get(registry, {}).has_key(className), "A database
object by the name %s has already been created" % repr(className)
AssertionError: A database object by the name 'ConfigItem' has already been created
the module does not create an instance, it just defines the object like this:
class ConfigItem(SQLObject):
_connection = _conn
var = StringCol(unique=True)
value = StringCol()
why is __new__ called when I reload the module and how can I avoid the error?
thanks
Paul
|