[spambayes-bugs] [ spambayes-Bugs-832070 ] bsddb.error: (22, 'Invalid argument')

SourceForge.net noreply at sourceforge.net
Thu Dec 4 21:23:59 EST 2003


Bugs item #832070, was opened at 2003-10-28 16:28
Message generated for change (Comment added) made by brucedog
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=832070&group_id=61702

Category: pop3proxy
Group: Source code 1.0a6
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Stephen Boulet (spboulet)
Assigned to: Nobody/Anonymous (nobody)
Summary: bsddb.error: (22, 'Invalid argument')

Initial Comment:
I'm not able to start sb_server any more from its
directory (though it will start from an empty directory):

$ Traceback (most recent call last):
  File "/usr/bin/sb_server.py", line 101, in ?
    import spambayes.message
  File
"/usr/lib/python2.2/site-packages/spambayes/message.py",
line 149, in ?
    msginfoDB = MessageInfoDB(message_info_db_name)
  File
"/usr/lib/python2.2/site-packages/spambayes/message.py",
line 114, in __init__
    self.dbm = dbmstorage.open(self.db_name, self.mode)
  File
"/usr/lib/python2.2/site-packages/spambayes/dbmstorage.py",
line 53, in open
    return f(*args)
  File
"/usr/lib/python2.2/site-packages/spambayes/dbmstorage.py",
line 36, in open_best
    return f(*args)
  File
"/usr/lib/python2.2/site-packages/spambayes/dbmstorage.py",
line 18, in open_dbhash
    return bsddb.hashopen(*args)
bsddb.error: (22, 'Invalid argument')

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

Comment By: Bruce Zollars (brucedog)
Date: 2003-12-04 18:23

Message:
Logged In: YES 
user_id=924285

I have had this problem on Win98 as well, although the error
now occurs on line 20 of dbmstorage.py. (The updated code
may have two inserted lines?)

The docstring for open_dbhash reads 
"""Open a bsddb hash.  Don't use this on Windows, unless
Python 2.3 or 
    greater is used, in which case bsddb3 is actually named
bsddb."""

I am on Windows, and using Python 2.2, so I should be using
the immediately preceding function, open_db3hash.  The
version of dbmstorage.py that came with Spambayes 1.0a6 had
no problem with this, so the new code is either failing to
recognize my OS, failing to recognize my Python version, or
failing to recognize my name for bsddb.

I am just teaching myself Python, so that I can understand
the Spambayes project.  I can read just enough code to
figure out the above, but nowhere near enough to figure out why.

Okay, I could move to Python 2.3, but there is not yet a
binary installer version of bsddb for Python 2.3 on Windows.
 What I have done is this: I have installed Spambayes 1.0a7,
then copied the dbmstorage.py script from the 1.0a6 version
into the site-packages/spambayes directory.  Working great.

Will try to learn enough more Python in the next few hours
to come up with a more permanent solution. (snicker)

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

Comment By: Tony Meyer (anadelonbrin)
Date: 2003-11-25 17:15

Message:
Logged In: YES 
user_id=552329

I believe I have found the problem here, and checked in a fix 
(dbmstorage.py 1.10).

You should be able to apply that change to your copy of 
dbmstorage.py, or use Python 2.3, or a pickle, until the next 
release.

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

Comment By: Tony Meyer (anadelonbrin)
Date: 2003-11-25 16:59

Message:
Logged In: YES 
user_id=552329

My wife's system (Win98) gets this now, too.  I think it may 
be related to the change in the storage.open_storage code, 
although I'm not certain.  It does appear to be a bug, 
though.  I'll look into this more as soon as I get a chance.

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

Comment By: Stephen Boulet (spboulet)
Date: 2003-10-31 11:51

Message:
Logged In: YES 
user_id=6988

This is a wild guess, but I wonder if my problem could be
related to changing my linux headers version to 2.4.21 from
2.4.19, recompiling glibc, but not recompiling python.

Stephen

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=832070&group_id=61702



More information about the Spambayes-bugs mailing list