Roundup Tracker - Issues

Message3698

Author jrplant
Recipients jrplant
Date 2009-04-29.09:54:09
Message-id <1240998850.97.0.815769086137.issue2550542@psf.upfronthosting.co.za>
In-reply-to
When running "roundup-admin migrate" to upgrade to 1.4.6 on my roundup 
1.3.3 installation with sqlite backend, the function  
"fix_version_4_tables" in /usr/local/lib/python2.5/site-
packages/roundup/backends/rdbms_common.py (quoted below)

>     def fix_version_4_tables(self):
>         # note this is an explicit call now
>         c = self.cursor
>         for cn, klass in self.classes.items():
>             c.execute('select id from _%s where __retired__<>0'%(cn,))
>             for (id,) in c.fetchall():
>                 c.execute('update _%s set __retired__=%s where 
id=%s'%(cn,
>                     self.arg, self.arg), (id, id))
...

throws the error:

> Traceback (most recent call last):
>   File "/usr/local/bin/roundup-admin", line 6, in <module>
>     run()
>   File "/usr/local/lib/python2.5/site-
packages/roundup/scripts/roundup_admin.py", line 38, in run
>     sys.exit(tool.main())
>   File "/usr/local/lib/python2.5/site-packages/roundup/admin.py", line 
1529, in main
>     ret = self.run_command(args)
>   File "/usr/local/lib/python2.5/site-packages/roundup/admin.py", line 
1428, in run_command
>     self.db = tracker.open('admin')
>   File "/usr/local/lib/python2.5/site-packages/roundup/instance.py", 
line 130, in open
>     db.post_init()
>   File "/usr/local/lib/python2.5/site-
packages/roundup/backends/rdbms_common.py", line 234, in post_init
>     save = save | self.upgrade_db()
>   File "/usr/local/lib/python2.5/site-
packages/roundup/backends/rdbms_common.py", line 287, in upgrade_db
>     self.fix_version_4_tables()
>   File "", line 309, in fix_version_4_tables
>     for (id,) in c.fetchall():
> TypeError: 'sqlite3.Row' object is not iterable

(Noticing that the code above changed the value of __retired__ to be the 
same as 'id' for rows where __retired__ was non-zero for all the object 
classes in the database, I worked around this by manually updating the 
tables, then commenting out the code above.  This allowed "roundup-admi 
n migrate" to complete without error.
History
Date User Action Args
2009-04-29 09:54:10jrplantsetmessageid: <1240998850.97.0.815769086137.issue2550542@psf.upfronthosting.co.za>
2009-04-29 09:54:10jrplantsetrecipients: + jrplant
2009-04-29 09:54:10jrplantlinkissue2550542 messages
2009-04-29 09:54:10jrplantcreate