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:55

Message:
Logged In: YES 
user_id=52572
Originator: NO

For some reason SF won't give me an option to attach files, so here it
is:

[imap]
server:localhost
username:dave
password:CeNsOrEd
use_ssl:True
spam_folder:INBOX.spam
unsure_folder:INBOX.unsure
ham_train_folders:INBOX.sb-training.ham
spam_train_folders:INBOX.sb-training.spam
[html_ui]
port:8004
display_adv_find:True
allow_remote_connections:localhost
http_authentication:Basic
http_password:CeNsOrEd
[Storage]
messageinfo_storage_file:/home/dave/spambayes/messageinfo.fs
persistent_storage_file:/home/dave/spambayes/hammie.fs
persistent_use_database:dbm
[Headers]
include_evidence:False
include_score:True
[Tokenizer]
x-search_for_habeas_headers:True
x-lookup_ip:True
lookup_ip_cache:/home/dave/spambayes/dnscache
x-pick_apart_urls:True
x-ocr_engine:gocr
max_image_size:100000
crack_images:True
crack_image_cache:/home/dave/spambayes/imagecache.pck
image_size:True
record_header_absence:True
summarize_email_prefixes:True
summarize_email_suffixes:True
mine_received_headers:True
[URLRetriever]
x-cache_directory:/home/dave/spambayes/url-cache
[globals]
verbose:True


----------------------------------------------------------------------

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
_______________________________________________
Spambayes-bugs mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-bugs

Reply via email to