[Spambayes] spam error...

Emperor DarkEmperor at gmx.net
Thu Sep 25 10:35:22 EDT 2003


Am Don, 2003-09-25 um 15.32 schrieb Skip Montanaro:
>     nils> File "/usr/lib/python2.2/shelve.py", line 65, in get
>     nils>   if self.dict.has_key(key):
>     nils> error: (22, 'Invalid argument')
> 
> This suggests your database got corrupted.  A few questions to help decide
> if this is a bug in the code or simply pilot error:
> 
>     * What version of SpamBayes are you running?
> 
>     * If you execute
> 
>         import whichdb, os
>         from spambayes import Options
>         dbfile = os.path.expanduser(Options.options["Storage",
>                                                     "persistent_storage_file"])
>         print whichdb.whichdb(dbfile)

I'm new to python and had to fight with newlines first, but it says
'None'

did I forgot to install something?

> 
>       what is printed?
> 
>     * The last time you power cycled your computer did you shut down
>       sb_server cleanly (that is, select "Save and shutdown" from your web
>       browser)? 
> 

surely not, I can't! why? here:

500 Server error
Traceback (most recent call last):

  File "/usr/lib/python2.2/site-packages/spambayes/Dibbler.py", line 453, in found_terminator
    getattr(plugin, name)(**params)

  File "/usr/lib/python2.2/site-packages/spambayes/UserInterface.py", line 477, in onSave
    self._doSave()

  File "/usr/lib/python2.2/site-packages/spambayes/UserInterface.py", line 470, in _doSave
    classifier.store()

  File "/usr/lib/python2.2/site-packages/spambayes/storage.py", line 229, in store
    self._write_state_key()

  File "/usr/lib/python2.2/site-packages/spambayes/storage.py", line 233, in _write_state_key
    self.db[self.statekey] = (classifier.PICKLE_VERSION,

  File "/usr/lib/python2.2/shelve.py", line 77, in __setitem__
    self.dict[key] = f.getvalue()

TypeError: object does not support item assignment

> If you're not running a fairly up-to-date version of SpamBayes (the most
> recent distribution is 1.0a6), you should upgrade (you have a lot of faith
> installing alpha software in /usr/bin!).  If whichdb reports "dumbdbm",
> either change your storage options to something like
> 
>     [Storage]
>     persistent_use_database: False
>     persistent_storage_file: ~/hammie.pck
> 
> so you start using a pickle as your training database, or get and install
> PyBSDDB, aka bsddb3 and delete your existing database files (there are
> probably some info caches you also need to delete).  You will need a recent
> (4.1.25 or later is best) version of Sleepycat's Berkeley DB database
> library.

I have the newest one, running on python 2.2.3.


> If you shut down your computer without cleanly exiting from sb_server,
> *whack*!  I just rapped your knuckles with a ruler. ;-) I didn't hit them
> very hard though.  Sb_server should probably catch a number of Unix signals
> and exit cleanly upon receipt.  I don't believe it does that at the moment.
> 
> Skip

beyond this, I still have my config problems, that sb_server.py doesn't
start the pop3 proxies automatically and that I have to reconfigure them
first...

ok, so what's the first step? ;)




More information about the Spambayes mailing list