Roundup Tracker - Issues

Issue 1077168

classification
Import failure with anydbm
Type: Severity: normal
Components: Database Versions:
process
Status: closed
:
: richard : ctrengove, richard
Priority: normal :

Created on 2004-12-01 23:26 by ctrengove, last changed 2005-02-14 21:31 by ctrengove.

Messages
msg1539 Author: [hidden] (ctrengove) Date: 2004-12-01 23:26
Importing a database under 0.7.9 crashes during the
"commit" phase using the anydbm backend. The full
traceback is

Traceback (most recent call last):
  File"
c:\python23\lib\site-packages\roundup\scripts\roundup_admin.py",
line 41, in ?
    run()
  File
"c:\python23\lib\site-packages\roundup\scripts\roundup_admin.py",
line 38, in run
    sys.exit(tool.main())
  File
"C:\Python23\Lib\site-packages\roundup\admin.py", line
1367, in main
    if self.db: self.db.commit()
  File
"c:\python23\lib\site-packages\roundup\backends\back_anydbm.py",
line 612, in commit
    reindex[method(*args)] = 1
  File
"c:\python23\lib\site-packages\roundup\backends\back_anydbm.py",
line 711, in doSetJournal
    params = self.serialise(classname, params)
  File
"c:\python23\lib\site-packages\roundup\backends\back_anydbm.py",
line 401, in serialise
    d[k] = v.serialise()
AttributeError: 'tuple' object has no attribute 'serialise'

The problem appears to be with the handling of dates
which are already date tuples; ie. don't need to be
serialised.
msg1540 Author: [hidden] (richard) Date: 2004-12-14 22:52
Logged In: YES 
user_id=6405

How old is your tracker database? 
msg1541 Author: [hidden] (ctrengove) Date: 2004-12-16 03:29
Logged In: YES 
user_id=1170021

The database was from 0.6.3.1, running on Linux. However, I
then installed version 0.7.9 and exported the database using
that. I didn't to anything special to modify the database
itself.
msg1542 Author: [hidden] (richard) Date: 2005-02-14 05:45
Logged In: YES 
user_id=6405

Is this still an issue with the latest 0.7 code? 
msg1543 Author: [hidden] (ctrengove) Date: 2005-02-14 21:31
Logged In: YES 
user_id=1170021

I have no problems any more, because the issue only arose
during my initial conversion of the old database. I managed
to get it converted by hacking Database.serialise() in
back_anydbm.py. I used something like,

        elif isinstance(prop, Date) and v is not None:
            if type(v) == tuple:          # inserted
                d[k] = str(v)               # inserted
            else:                             # inserted
                d[k] = v.serialise()

and then I could convert the database successfully. Then I
removed the hack, and everything has been fine ever since.

So I am not concerned about this particular issue any more,
but maybe somebody else will be some day!
History
Date User Action Args
2004-12-01 23:26:55ctrengovecreate