[Spambayes] Re: Using MySQL [WAS: The joys of error messages.]

Alex Brooks askoorb at fastmail.fm
Thu May 13 16:55:46 EDT 2004


Michael C. Neel wrote:

>  There may be a problem in 1.0rc1 in using MySQL, which I'm trying to
>  do to see how it would go. Currently you get the traceback:
>
>  ...... msginfoDB = MessageInfoDB(message_info_db_name) elif
>  options["Storage", "persistent_use_database"] is False or \
>  options["Storage", "persistent_use_database"] == "pickle": msginfoDB
>  = MessageInfoPickle(message_info_db_name)
>
>
>  I'm not sure exactly how MySQL is supposed to work, I can't find docs
>  on it other than source code comments =). My impressions is the
>  msgingo.db is *not* placed into the mysql database at this time, only
>  the hammie.db.
>
> > /You need to set the [Storage] persistent_use_database option to
> > "mysql". You can do this via the web interface, I believe, or just
> > by manually editing your configuration file. The 'name' of your
> > database should be something like:
> >
> > host:localhost user:username pass:password dbname:database_name
> >
> > (If you leave any one item out, they default to:
> >
> > host = "localhost" username = "root" password = "" db_name =
> > "spambayes" )
> >
> > You need to set the mySQL db up yourself first, creating the
> > appropriate database. The table "bayes" will be created by
> > SpamBayes.
> >
> > Feedback would be great! /
> >
Well, I have also got the error

D:\Python23\Scripts>python sb_imapfilter.py -b
Traceback (most recent call last):
  File "sb_imapfilter.py", line 121, in ?
    from spambayes.UserInterface import UserInterfaceServer
  File "D:\PYTHON23\Lib\site-packages\spambayes\UserInterface.py", line 
89, in ?

    from spambayes import Stats
  File "D:\PYTHON23\Lib\site-packages\spambayes\Stats.py", line 34, in ?
    from spambayes.message import msginfoDB
ImportError: cannot import name msginfoDB

As I have said, I am using the latest CVS from the public server.  I 
have set my mysql server to have the default values of having a user 
root, password {none} with a database of  'spambayes'.  My 
bayescustomize.ini is as follows

[Storage]
messageinfo_storage_file:
persistent_storage_file:
persistent_use_database:mysql
[imap]
password:wouldntyouliketoknow
server:imap.myrealbox.com
username:seepassword

I have tried the default "messageinfo_storage_file:" and 
"persistent_storage_file:" lines, as well as setting them to 
"messageinfo_storage_file:host:localhost user:root 
pass:dbname:spambayes" and "persistent_storage_file:host:localhost 
user:root pass:dbname:spambayes"
AND tried setting the last lines without the password part.

As you can see, I've tried everything I could think of.

Any help would be greatly appreciated.

Alex Brooks

(again)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/spambayes/attachments/20040513/656a89cb/attachment.html


More information about the Spambayes mailing list