[spambayes-bugs] [ spambayes-Bugs-1387699 ] train_on_filter=True needs the db to be opened read/write
SourceForge.net
noreply at sourceforge.net
Thu Jul 26 04:54:24 CEST 2007
Bugs item #1387699, was opened at 2005-12-21 21:14
Message generated for change (Comment added) made by david_abrahams
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1387699&group_id=61702
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: hammie
Group: 1.0.4
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: aikiaboy (aikiaboy)
Assigned to: Nobody/Anonymous (nobody)
Summary: train_on_filter=True needs the db to be opened read/write
Initial Comment:
train_on_filter=True needs the db to be opened
read/write for classification
eg.
========================
[globals]
dbm_type=db3hash
verbose=True
[Headers]
include_score=True
[html_ui]
display_adv_find=True
[Storage]
persistent_use_database=dbm
persistent_storage_file=./hammie.db
[Hammie]
train_on_filter=True
=========================
$ sb_filter.py
asdf
fdsa
Loading state
from /u/k/a/kantor/.spambayes/./hammie.db database
/u/k/a/kantor/.spambayes/./hammie.db is an existing
database, with 2273 spam and 711 ham
Traceback (most recent call last):
File "/u/k/a/kantor/bin/sb_filter.py", line 257, in ?
main()
File "/u/k/a/kantor/bin/sb_filter.py", line 248, in
main
action(msg)
File "/u/k/a/kantor/bin/sb_filter.py", line 180, in
filter
return self.h.filter(msg)
File "/u/k/a/kantor/bin/spambayes/lib/python2.4/site-
packages/spambayes/hammie.py", line 120, in filter
File "/u/k/a/kantor/bin/spambayes/lib/python2.4/site-
packages/spambayes/hammie.py", line 162, in train
File "/u/k/a/kantor/bin/spambayes/lib/python2.4/site-
packages/spambayes/classifier.py", line 273, in learn
File "/u/k/a/kantor/bin/spambayes/lib/python2.4/site-
packages/spambayes/classifier.py", line 384, in
_add_msg
File "/u/k/a/kantor/bin/spambayes/lib/python2.4/site-
packages/spambayes/storage.py", line 304, in
_wordinfoset
File "/s/python-
2.4.1/sun4x_58/lib/python2.4/shelve.py", line 130, in
__setitem__
self.dict[key] = f.getvalue()
File "../spambayes//lib/python2.4/site-
packages/bsddb3/__init__.py", line 218, in __setitem__
bsddb._db.DBAccessError: (13, 'Permission denied --
put: attempt to modify a read-only tree')
----------------------------------------------------------------------
Comment By: David Abrahams (david_abrahams)
Date: 2007-07-25 21:54
Message:
Logged In: YES
user_id=52572
Originator: NO
Did you ever check in this fix? I'm seeing the same error with the SVN
head, but without train_on_error=True, and more importantly, without the
helpful backtrace :(
$ echo | sb_filter.py
opened existing cache with 802 A records and 0 PTR records
Loading state from /home/dave/spambayes/hammie.fs database
/home/dave/spambayes/hammie.fs is an existing database, with 728 spam
and 128 ham
X-Spambayes-Classification: spam; 0.93
Persisting /home/dave/spambayes/hammie.fs state in database
Exception bsddb._db.DBAccessError: (13, 'Permission denied -- put:
attempt to modify a read-only tree') in <bound method HammieFilter.close of
<__main__.HammieFilter object at 0x857cc2c>> ignored
saving 124 items to /home/dave/spambayes/imagecache.pck
My .spambayesrc is attached
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2006-04-02 07:05
Message:
Logged In: YES
user_id=552329
Fixed (CVS is down at the moment; I'll check it in once it's
done).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1387699&group_id=61702
More information about the Spambayes-bugs
mailing list