Roundup Tracker - Issues

Issue 1241230

classification
"unmarshallable object" errors when migrating to metakit
Type: Severity: normal
Components: Database Versions:
process
Status: closed invalid
:
: richard : glandrum, richard
Priority: normal :

Created on 2005-07-19 22:41 by glandrum, last changed 2005-07-19 22:41 by glandrum.

Messages
msg2000 Author: [hidden] (glandrum) Date: 2005-07-19 22:41
I've got a couple version 0.8.3 trackers running on the
anydbm backend
which I'm interested in migrating over to metakit.

In the process of following the instructions here:
http://roundup.sourceforge.net/doc-0.8/admin_guide.html#migrating-backends
I hit a problem at step 6 (the import of the old data
into the new tracker).

The traceback is:
roundup> import RDTrack.19July2005
setting status 9
setting keyword 19
setting priority 11
Traceback (most recent call last):
 File
"/usr/local/lib/python2.3/site-packages/roundup/admin.py",
line
1326, in run_command
   ret = function(args[1:])
 File
"/usr/local/lib/python2.3/site-packages/roundup/admin.py",
line
1151, in do_import
   cl.import_journals(reader)
 File
"/usr/local/lib/python2.3/site-packages/roundup/backends/back_metakit.py",
line 1752, in import_journals
   self.db.setjournal(self.classname, nodeid, l)
 File
"/usr/local/lib/python2.3/site-packages/roundup/backends/back_metakit.py",
line 245, in setjournal
   params=marshal.dumps(params))
ValueError: unmarshallable object

By putting in some printing statements, I'mr able to
narrow things
down a bit and determine that the unmarshallable params
object in
question is a password dictionary:
{'password': <roundup.password.Password instance at
0x40789a0c>}

In the interests of trying to get things to work, I
modified the
relevant code in .../backends/back_metakit.py to:

   def setjournal(self, tablenm, nodeid, journal):
       '''Set the journal to the "journal" list.'''
       tblid = self.tables.find(name=tablenm)
       if tblid == -1:
           tblid = self.tables.append(name=tablenm)
       for nodeid, date, user, action, params in journal:
           #
tableid:I,nodeid:I,date:I,user:I,action:I,params:B
           try:
             self.hist.append(tableid=tblid,
                              nodeid=int(nodeid),
                              date=date,
                              action=action,
                              user=int(user),
                              params=marshal.dumps(params))
           except:
             import traceback
             traceback.print_exc()
             print 'ps:',params

This allows me to import the old data (except for that
password entry)
and produces a tracker that at least seems to work.
History
Date User Action Args
2005-07-19 22:41:45glandrumcreate