[spambayes-bugs] [ spambayes-Bugs-811725 ] 1.06a - which_database
fails on Win32
SourceForge.net
noreply at sourceforge.net
Tue Sep 30 00:41:22 EDT 2003
Bugs item #811725, was opened at 2003-09-25 00:28
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=811725&group_id=61702
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Shawn Behrens (sbehrens)
Assigned to: Nobody/Anonymous (nobody)
Summary: 1.06a - which_database fails on Win32
Initial Comment:
1.06a on a WinXP, Python 2.3, new installation running
as service. Tried with service started and service
stopped. which_database shows my storage as a 'None'.
On further reflection, this is to be expected, as the
database I actually see is called
'message_info_database.db'. It seems that
which_database uses the persistant_storage_file
property, where spambayes uses messageinfo_storage_file.
>From bayescustomize.ini:
messageinfo_storage_file: C:\Documents and
Settings\DawnWolf\Application
Data\SpamBayes\Proxy\message_info_database.db
persistent_storage_file: C:\Documents and
Settings\DawnWolf\Application
Data\SpamBayes\Proxy\statistics_database.db
Output of running which_database:
C:\Program Files\spambayes\utilities>which_database.py
Pickle is available.
Dumbdbm is available.
Dbhash is available.
Bsddb[3] is available.
Your storage C:\Documents and
Settings\[User]\Application Data\SpamBayes\Proxy
\statistics_database.db is a: None
----------------------------------------------------------------------
>Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-30 16:41
Message:
Logged In: YES
user_id=552329
There should definately be two databases, unless you haven't
done any training (in that case I think the message info one
gets created but the stats one doesnt).
You are correct when you say that it doesn't look at the
message info db at all. It will be the same as the stats db
unless the stats one is a pickle. The whole message info db
thing hasn't really been finalised yet, unfortunately (this is
only alpha software ;)
I think I see the problem here - when running as a service,
windows says that the correct place to put data is
under 'LocalService'. However, if you run as a user instead
(like running which_database.py), windows says that the user
directory is the place to be.
I'm not sure that anything can be done about this -
which_database is only a little diagnostic tool, in any case.
You could set the BAYESCUSTOMIZE environment variable to
the full path to the localservice .ini, which would solve the
problem. Otherwise which_database has to be running as a
service as well, to get the new location.
I'll close this, but if you're not satisfied, please reopen :)
----------------------------------------------------------------------
Comment By: Shawn Behrens (sbehrens)
Date: 2003-09-25 23:58
Message:
Logged In: YES
user_id=748552
Okay, getting closer, and morphing the bug report: In the
configuration screen, I see both databases defined as
residing under 'LocalService'. And that's where they are,
sure enough.
So, the option readout method fails? There is a
bayescustomize.ini under 'LocalService' as well as the local
user's directory. which_database attempts to find the
database under the local user's directory, and that's why it
fails.
Got to love Windows quirks ...
----------------------------------------------------------------------
Comment By: Shawn Behrens (sbehrens)
Date: 2003-09-25 14:14
Message:
Logged In: YES
user_id=748552
>>
None should mean that the file is unreadable or doesn't exist.
Is this the case?
>>
Yes, that is the case. There is a message_info_database.db ,
but no statistics_database.db . Should
statistics_database.db be created? Or is that an optional
item with a default of "off"?
> I'll update which_database to print out a nicer message
in this case.
which_database only checks one of the two files, then. It
looks for whatever "persistent_storage_file" is set to ; it
does not check "messageinfo_storage_file".
> What version of Python are you using?
2.3
> What should the answer be?
I am using the default, which turns out to be a dbhash.
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-25 12:59
Message:
Logged In: YES
user_id=552329
SpamBayes uses *two* databases. One, the
message_info_database.db, keeps track of which messages it
has already seen/trained. The other, statistics_database.db,
keeps track of statistics - basically how many times each
word (token) has been seen in ham and spam.
None should mean that the file is unreadable or doesn't exist.
Is this the case? I'll update which_database to print out a
nicer message in this case. It works fine for me. What
version of Python are you using? What should the answer
be? (i.e. are you using the default, which would be dbhash or
bsddb[3], or have you changed to a pickle).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=811725&group_id=61702
More information about the Spambayes-bugs
mailing list