[kforge-dev] Re: [kforge-user] kforge-config-rebuild problem
John Bywater
john.bywater at appropriatesoftwarefoundation.org
Mon Jan 16 11:14:17 UTC 2006
Hi Marc,
Thanks for your message.
Yes, I'm sure the problem is that the latest SQLObject has changed the
addAttribute method.
By the looks of things, in:
kforge/core/db/__init__.py (about line 206)
we need to change:
mapperClass.addColumn(sqlAttribute, changeSchema=True)
to:
if hasattr(mapperClass.sqlmeta, 'addColumn'):
mapperClass.sqlmeta.addColumn(sqlAttribute, changeSchema=True)
else:
mapperClass.addColumn(sqlAttribute, changeSchema=True)
I don't know if there will be any more problems after this change, but
tomorrow I'll run the latest kforge against the latest sqloject to see
if I can recreate the problem.
More later...
John.
markc at renta.net wrote:
>I'm on an Ubuntu breezy system and have postgresql-8.0 installed. Is it
>possible that the current schema only works with postgesql 0.7? I have
>also been using Turbogears from svn which also pulls in the latest
>SQLObject, perhaps that could be the problem ?
>
>Or, would anyone have a suggestion as to how to fix this problem below?
>
>(beware, ugly python debug output follows)
>
># bin/kforge-config-rebuild
>/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/main.py:581: DeprecationWarning: Use of this attribute should be replaced with .sqlmeta.addColumn
> '.sqlmeta.%s' % self.name, level=self.deprecation_level)
>Traceback (most recent call last):
> File "bin/kforge-config-rebuild", line 8, in ?
> from kforge.apache.apacheconfig import ApacheConfigBuilder
> File "/home/w/com/motd/kforge/lib/python/kforge/apache/apacheconfig.py", line 3, in ?
> import kforge.dom
> File "/home/w/com/motd/kforge/lib/python/kforge/dom/__init__.py", line 5, in ?
> import kforge.dom.accesscontrol
> File "/home/w/com/motd/kforge/lib/python/kforge/dom/accesscontrol.py", line 100, in ?
> DomainRegistry().registerDomainClass(PermissionType)
> File "/home/w/com/motd/kforge/lib/python/kforge/core/dom/registry.py", line 61, in registerDomainClass
> self.setDeferredAttributesOnRegisteredClasses(domainClass)
> File "/home/w/com/motd/kforge/lib/python/kforge/core/dom/registry.py", line 112, in setDeferredAttributesOnRegisteredClasses
> self.addPersistenceAttribute(className, deferredAttr)
> File "/home/w/com/motd/kforge/lib/python/kforge/core/dom/registry.py", line 142, in addPersistenceAttribute
> self.database.addPersistenceAttribute(className, attribute)
> File "/home/w/com/motd/kforge/lib/python/kforge/core/db/__init__.py", line 208, in addPersistenceAttribute
> mapperClass.addColumn(sqlAttribute, changeSchema=False)
> File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/main.py", line 298, in addColumn
> assert name not in sqlmeta.columns, (
>AssertionError: The class sqlobject.declarative.Permission already has a column 'permissionTypeID' (<KeyCol 485b5554 permissionTypeID>), you cannot add the column <KeyCol 485b5554 permissionTypeID>
>
>--markc
>
>_______________________________________________
>kforge-user mailing list
>kforge-user at lists.okfn.org
>http://lists.okfn.org/mailman/listinfo/kforge-user
>
>
>
>
>
More information about the kforge-dev
mailing list