[kforge-dev] windows problem creating database

Rufus Pollock rufus.pollock at okfn.org
Tue Aug 15 18:11:11 UTC 2006


Nikolas Bowe wrote:
> Thanks for your feadback Rufus.
>  
>  
>  > Looking at your db dump it seems it seems that the last thing that
>  > work was createStates suggesting the problem is in createRoles. Why
>  > not try putting some debug code in there and seeing what happens to
>  > narrow the problem down.
> I put some prints in. turns out its in createProtectionObjects() in 
> command/initialise.py.
> the very first time it tries to call 
> self.registry.protectionObjects.create() it gets this exception.

> this call eventually gets to ProtectionObject::initialise in 
> core/dom/accesscontrol.py
> but it fails at
>     self.permissions.create(action)
> on the first action.
>  
> I dont really know where to go from here. Is there some way i can get a 
> stack trace at the point the exception is thrown?

Try starting a python shell via kforge-admin

$ kforge-admin help

will tell you about this.

Once in the shell:

 >>> import kforge
 >>> app = kforge.getA()
 >>> registry = app.registry
 >>> for xx in registry.protectionObjects:
...     print xx
# given what you have said this should be empty
 >>> registry.protectionObjects.create('Session')

NB: see docs/cli_shell.txt for more info on using the shell
NB: might want to rebuild the db before doing this

Regards,

Rufus




More information about the kforge-dev mailing list