Roundup Tracker - Issues

Message2275

Author tkanka
Recipients
Date 2006-06-26.19:45:48
Message-id
In-reply-to
I exported my database, tried to import it to another
tracker and got "TypeError: Integer keys only allowed
for Recno and Queue DB's". 

Roundup version is "1.1.2 (python 2.3.5)", and I'm
using Debian testing distribution. The used database
contains FileClass items and the target tracker uses
anydbm backend. 

The full traceback is here:
----
Traceback (most recent call last):
  File
"/usr/lib/python2.3/site-packages/roundup/admin.py",
line 1359, in run_command
    ret = function(args[1:])
  File
"/usr/lib/python2.3/site-packages/roundup/admin.py",
line 1171, in do_import
    cl.import_files(dir, nodeid)
  File
"/usr/lib/python2.3/site-packages/roundup/hyperdb.py",
line 899, in import_files
    mime_type = self.get(nodeid, 'type')
  File
"/usr/lib/python2.3/site-packages/roundup/backends/back_anydbm.py",
line 2075, in get
    return Class.get(self, nodeid, propname)
  File
"/usr/lib/python2.3/site-packages/roundup/backends/back_anydbm.py",
line 927, in get
    d = self.db.getnode(self.classname, nodeid)
  File
"/usr/lib/python2.3/site-packages/roundup/backends/back_anydbm.py",
line 331, in getnode
    if not db.has_key(nodeid):
  File "/usr/lib/python2.3/bsddb/__init__.py", line
142, in has_key
    return self.db.has_key(key)
TypeError: Integer keys only allowed for Recno and
Queue DB's
----

The error can be reproduced with the following script:

----
rm -rf tmp
mkdir tmp
roundup-admin -v
roundup-admin -i tmp/t1 install classic anydbm
mail_domain=localhost,mail_host=examplehost,tracker_web=http://localhost/tracker
roundup-admin -i tmp/t1 initialise pw
roundup-admin -i tmp/t1 create file name=test.txt
type='text/plain' content='some test text'
roundup-admin -i tmp/t1 export tmp/export
roundup-admin -i tmp/t2 install classic anydbm
mail_domain=localhost,mail_host=examplehost,tracker_web=http://localhost/tracker
roundup-admin -i tmp/t2 initialise pw
roundup-admin -i tmp/t2 import tmp/export
----

The roundup.admin.do_import explicitly converts nodeid
to integer and then it is given to anydbm backend which
accepts only  strings for keys. Should the ids always
be strings, or should the backends convert integers to
string when needed?
History
Date User Action Args
2009-02-03 14:21:48adminlinkissue1512939 messages
2009-02-03 14:21:48admincreate