[Mailman-Developers] Exporting member info (including options)

Aaron Kreider aaron at campusactivism.org
Wed Aug 18 00:40:19 CEST 2010


  When I tried to depickle a list, I got an "Import Error No Module 
named Mailman.Bouncer".

I suspect this is for a list that has bounces.  I was able to depickle a 
much smaller list.

Could it be a users permission issue? I tried running the script as 
root, but it still gave me the error. I'm using this python script, 
running it in the mailman/Mailman directory:



import sys, optparse, cPickle, os
try:
     import json
except:
     import simplejson as json

# Setup the arguments this script can accept from the command line
parser = optparse.OptionParser()
parser.add_option('-p','--pickled_data_path',dest="pickled_data_path",type="string",help="Path 
to the file containing pickled data.")
parser.add_option('-j','--json_data_path',dest="json_data_path",type="string",help="Path 
to where the json data should be saved.")
opts,args=parser.parse_args()

# Load in the pickled data from either a file or the standard input stream
if opts.pickled_data_path:
     unpickled_data = cPickle.loads(open(opts.pickled_data_path).read())
else:
     unpickled_data = cPickle.loads(sys.stdin.read())

# Output the json version of the data either to another file or to the 
standard output
if opts.json_data_path:
     open(opts.json_data_path, 'w').write(json.dumps(unpickled_data))
else:
     print unpickled_data



Full Error:
File "pickle2jsonroot.py", line 15, in ?
     unpickled_data = cPickle.loads(open(opts.pickled_data_path).read())
ImportError: No module named Mailman.Bouncer



More information about the Mailman-Developers mailing list