[Spambayes] error on attempting to export data

Skip Montanaro skip at pobox.com
Tue Sep 23 14:40:40 EDT 2003


    mark> I'm using python 2.3, and I downloaded the spambayes 1.0a6.zip
    mark> file, and unzipped the stuff to the c:\python23 subdirectory.
    mark> When I run what you suggested, I get:

    mark> c:\python23\python setup.py install
    mark> Traceback (most recent call last):
    mark>   File "setup.py", line 27, in ?
    mark>     from spambayes import __version__
    mark> ImportError: No module named spambayes

Hmmm...  I would unzip the spambayes stuff into it's own folder.  I don't
think there should be a problem unzipping it int c:\Python23, but if you
later want to uninstall Python23, it's now got cruft the uninstaller doesn't
know what to do with.

I just had occasion to do precisely this today on my Windows machine.  I
downloaded and ran the Python 2.3 installer, then downloaded and expanded
the spambyaes-1.0a6.zip file.  From a CMD prompt I executed

    c:\Python23\python.exe setup.py install

and it installed as advertised.  c:\Python23\Lib\site-packages has a
spambayes folder which contains (among other things) a storage.py file.  I
can import spambayes and spambayes.__version__ reports 1.0a6.

You should take this back to the spambayes list (I've cc'd it).  You've
exhausted my feeble Windows knowledge.  Something's definitely not right
though.  Maybe you trashed some files with your mixed spambayes/python
directory tree.

Skip

    mark>  - Mark


    mark> -----------------------------------------------
    mark> Mark Fitzgerald
    mark> Workplace Automation Technology
    mark> Key Services Corporation
    mark> (518) 391-1110



    mark> skip at pobox.com 
    mark> 09/23/2003 12:45 PM
    mark> Please respond to
    mark> skip at pobox.com


    mark> To
    mark> mark_fitzgerald at keybank.com
    mark> cc
    mark> spambayes at python.org
    mark> Subject
    mark> Re: [Spambayes] error on attempting to export data







    mark> I'm trying to use:
    mark> C:\spambayes>sb_dbexpimp.py -e -d default_bayes_database.db -f 
    mark> mybayes.db.export

    mark> and the error i get is:

    mark> Traceback (most recent call last):
    mark> File "C:\spambayes\sb_dbexpimp.py", line 100, in ?
    mark> import spambayes.storage
    mark> ImportError: No module named spambayes.storage

    mark> I've dumped everything in one single directory because I thought
    mark> the error was caused by a path problem, but no dice. Can anyone
    mark> help?  thanks.

    mark> Mark,

    mark> How did you install SpamBayes?  From the top-level directory you would
    mark> normally execute

    mark>     python setup.py install

    mark> assuming the directory containing python.exe is on your PATH.  The result
    mark> would be the creation of a spambayes directory containing (among other
    mark> things) storage.py in Python's site-packages directory.  Later execution 
    mark> of

    mark>     python c:\spambayes\sb_dbexpimp.py ...

    mark> should be able to find spambayes.storage.

    mark> Skip






More information about the Spambayes mailing list