[spambayes-bugs] [ spambayes-Bugs-809769 ] TypeError when training
1.0a6
SourceForge.net
noreply at sourceforge.net
Tue Sep 23 23:56:42 EDT 2003
Bugs item #809769, was opened at 2003-09-21 02:30
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=809769&group_id=61702
Category: pop3proxy
Group: Source code 1.0a5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Shawn Behrens (sbehrens)
Assigned to: Tony Meyer (anadelonbrin)
Summary: TypeError when training 1.0a6
Initial Comment:
This is a newly set up 1.0a6 running as a service on
WinXP. No settings have been imported from 1.0a5, nor
has the database.
Upon training from the cache, I receive a typeerror:
Training... Trained on 7 messages. Saving...
500 Server error
Traceback (most recent call last):
File "C:\Program
Files\spambayes\spambayes\Dibbler.py", line 453, in
found_terminator
getattr(plugin, name)(**params)
File "C:\Program
Files\spambayes\spambayes\ProxyUI.py", line 324, in
onReview
self._doSave()
File "C:\Program
Files\spambayes\spambayes\UserInterface.py", line 470,
in _doSave
classifier.store()
File "C:\Program
Files\spambayes\spambayes\storage.py", line 229, in store
self._write_state_key()
File "C:\Program
Files\spambayes\spambayes\storage.py", line 233, in
_write_state_key
self.db[self.statekey] = (classifier.PICKLE_VERSION,
File "C:\Python23\lib\shelve.py", line 130, in
__setitem__
self.dict[key] = f.getvalue()
TypeError: object does not support item assignment
----------------------------------------------------------------------
>Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-24 15:56
Message:
Logged In: YES
user_id=552329
Ok. As mentioned elsewhere, the problem arises any time the
options (or advanced options) are saved. What as happening
is that the database was closed and then reopened, but the
ui kept trying to use the old instance of the db (which was
closed).
This is now fixed in cvs, so will be in 1.1b1. For the moment,
simply restarting sb_server after changing the options works.
A nicer solution would just be to use a pickle instead of a
dbm - pickles aren't effected by this problem, AFAIK.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-22 21:39
Message:
Logged In: YES
user_id=552329
In fact, you should be able to fix this by simply stopping
sb_server (or the service), and then starting it again.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-22 21:34
Message:
Logged In: YES
user_id=552329
Argh. Forget that, I can duplicate this.
If you delete the newly created databases (they will most
likely be in c:\documents and settings\[username]\application
data\spambayes\proxy) then everything should work again.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-22 21:25
Message:
Logged In: YES
user_id=552329
Do you *have* a database? If you set the verbose option to
true and run in a console window, do you get the message
about "using ... database with x messages" (or the "using new
database"? What happens if you use a pickle instead of dbm?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=809769&group_id=61702
More information about the Spambayes-bugs
mailing list