On 8/17/2010 7:12 PM, Mark Sapiro wrote:
There are at least three ways around this.
run your script from Mailman's bin/ directory and 'import paths' at the
beginning of the script, or
This worked. Now I get a JSON error:
File "pickle2json.py", line 21, in ?
open(opts.json_data_path, 'w').write(json.dumps(unpickled_data))
File "build/bdist.linux-x86_64/egg/simplejson/__init__.py", line 261,
in dumps
File "build/bdist.linux-x86_64/egg/simplejson/encoder.py", line 214,
in encode
File "build/bdist.linux-x86_64/egg/simplejson/encoder.py", line 282,
in iterencode
File "build/bdist.linux-x86_64/egg/simplejson/encoder.py", line 190,
in default
TypeError: <bounce info for member em...@domain.org
current score: 1.0
last bounce date: (2007, 1, 8)
email notices left: 3
last notice date: (1970, 1, 1)
confirmation cookie: None
> is not JSON serializable
I also tried adding skipkeys=True to the JSON decode, but that didn't work:
open(opts.json_data_path, 'w').write(json.dumps(unpickled_data,
skipkeys=True))
Some Googling on this topic suggests that simplejson cannot handle
decimal places. Is that true? It might also be having a problem with
the date objects.
I might just manually delete all the bounce data for all the lists
(around 20) in the mailman admin interface, so I can export them.
Aaron
_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives:
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9