[Spambayes] HELP please!

Tegels, Kent Kent.Tegels at hdrinc.com
Wed Jan 7 17:14:32 EST 2004


 
Traceback (most recent call last):
  File "G:\sba\spamcounts.py", line 138, in ?
    sys.exit(main(sys.argv[1:]))
  File "G:\sba\spamcounts.py", line 125, in main
    db = shelve.open(dbname, flag='r')
  File "G:\Python23\lib\shelve.py", line 231, in open
    return DbfilenameShelf(filename, flag, protocol, writeback, binary)
  File "G:\Python23\lib\shelve.py", line 212, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol,
writeback, binar
y)
  File "G:\Python23\lib\anydbm.py", line 77, in open
    raise error, "need 'c' or 'n' flag to open new db"
anydbm.error: need 'c' or 'n' flag to open new db
Exception exceptions.AttributeError: "DbfilenameShelf instance has no
attribute
'writeback'" in  ignored

-----Original Message-----
From: Skip Montanaro [mailto:skip at pobox.com] 
Sent: Wednesday, January 07, 2004 2:05 PM
To: Tegels, Kent
Cc: spambayes at python.org
Subject: Re: [Spambayes] HELP please!


    Kent> I'm still trying to get SpamCounts.py to work. When I issue
this
    Kent> command:
    Kent> G:\sba>spamcounts.py -d "G:\Documents and
Settings\(*omitted*)\Application
Data\SpamBayes\default_message_database.db" --pickle
 
    Kent> I get this error:
    Kent> Traceback (most recent call last):
    Kent>   File "G:\sba\spamcounts.py", line 138, in ?
    Kent>     sys.exit(main(sys.argv[1:]))
    Kent>   File "G:\sba\spamcounts.py", line 122, in main
    Kent>     db = pickle.load(file(dbname))
    Kent>   File "G:\Python23\lib\pickle.py", line 1390, in load
    Kent>     return Unpickler(file).load()
    Kent>   File "G:\Python23\lib\pickle.py", line 872, in load
    Kent>     dispatch[key](self)
    Kent> KeyError: '\x00'

My only offhand suggestion is that perhaps your database isn't really a
pickle.  What happens if you lose the "--pickle" flag?

Skip





More information about the Spambayes mailing list