ImportError: No module named spambayes.resources (line 12 of setup_all.py)
Hey all! Not sure if anyone is still reading this, but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following: ImportError: No module named spambayes.resources (line 12 of setup_all.py) I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe. Any idea on how to resolve this module import error? Thank you! Erik Brown
Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check: Are you sure that you're using a version of Python that's contemporaneous with the packaging? You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes that's not what you want it to find? Regards, Matt
You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources?
At the top-level spambayes directory, there is a spambayes/windows/setup_all.py. That suggests to me that something about the way the Windows package is built equates the spambayes/windows directory with spambayes. That's about all I know. I have never done anything with Windows development. Skip
Thank you all for the quick replys! So I'm not a dev, more of a power user, and I just added the python folder and script folder to the windows path. I then ran it in a CMD prompt, python setup_all.py, and it actually found the resources it needed. However, it ended up throwing a wild error: ImportError: No module named 00062FFF-0000-C000-000000000046x0x9x0 LOL! BTW Matthew, what do you mean by copy the files? Do you mean the source files and you manually install the com addin? Please let me know what you mean. = ) Take care, Erik Brown -----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Wednesday, August 24, 2022 7:37 PM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py) Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check: Are you sure that you're using a version of Python that's contemporaneous with the packaging? You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes that's not what you want it to find? Regards, Matt
It looks like that's telling you Outlook 2000 isn't installed, which is probably expected. See also https://mail.python.org/pipermail/spambayes-dev/2004-July/002938.html But that's probably out of date too - you probably need to find the GUIDs in the registry editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib, or in Pythonwin's "com browser". (Sadly I don't have office or outlook installed here, so can't tell you exactly what you need) Mark On 25/08/2022 1:48 pm, Erik M. Brown via spambayes-dev wrote:
Thank you all for the quick replys! So I'm not a dev, more of a power user, and I just added the python folder and script folder to the windows path. I then ran it in a CMD prompt, python setup_all.py, and it actually found the resources it needed. However, it ended up throwing a wild error:
ImportError: No module named 00062FFF-0000-C000-000000000046x0x9x0
LOL! BTW Matthew, what do you mean by copy the files? Do you mean the source files and you manually install the com addin?
Please let me know what you mean. = )
Take care,
Erik Brown
-----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Wednesday, August 24, 2022 7:37 PM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check:
Are you sure that you're using a version of Python that's contemporaneous with the packaging?
You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes that's not what you want it to find?
Regards, Matt
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
Bravo Mark...LOL! So I actually found my old HD with Windows XP and Outlook 2003 installed, and I'm booting from it, testing all of this. Because I'm running Outlook 2003, the link you sent actually worked. I changed it to the following: typelibs = [ ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 2), ('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 2), ('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0, 1, 0), ] When I ran setup_all.py this time, it appeared that all of the files were then in the build and distribution folders. Next up was install Inno Setup from around that time, and I ran spambayes.iss. So close, but no cigar because I got the following error: Compiler Error Line 125: Column 13: - [Error] (37:13) Unknown identifier 'convert_db' The code looks like this in the spambayes.iss file: function ConvertDatabase () : Boolean; begin Result : =convert_db ; end; Any ideas? Take care, Erik Brown -----Original Message----- From: Mark Hammond [mailto:skippy.hammond@gmail.com] Sent: Thursday, August 25, 2022 12:03 AM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py) It looks like that's telling you Outlook 2000 isn't installed, which is probably expected. See also https://mail.python.org/pipermail/spambayes-dev/2004-July/002938.html But that's probably out of date too - you probably need to find the GUIDs in the registry editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib, or in Pythonwin's "com browser". (Sadly I don't have office or outlook installed here, so can't tell you exactly what you need) Mark On 25/08/2022 1:48 pm, Erik M. Brown via spambayes-dev wrote:
Thank you all for the quick replys! So I'm not a dev, more of a power user, and I just added the python folder and script folder to the windows path. I then ran it in a CMD prompt, python setup_all.py, and it actually found the resources it needed. However, it ended up throwing a wild error:
ImportError: No module named 00062FFF-0000-C000-000000000046x0x9x0
LOL! BTW Matthew, what do you mean by copy the files? Do you mean the source files and you manually install the com addin?
Please let me know what you mean. = )
Take care,
Erik Brown
-----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Wednesday, August 24, 2022 7:37 PM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check:
Are you sure that you're using a version of Python that's contemporaneous with the packaging?
You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes that's not what you want it to find?
Regards, Matt
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
I'm afraid I have no idea about that. It looks like I don't even have the latest spambayes source tree here, and don't even have svn to update it! My version does seem to correctly declare "convert_db" as a boolean, but I can't remember enough about inno to know what might be going wrong. Spambayes was always capable of running from source, so in the first instance maybe try ignoring inno and follow the instructions in Outlook2000/README.txt? HTH, Mark On 25/08/2022 3:04 pm, Erik M. Brown via spambayes-dev wrote:
Bravo Mark...LOL!
So I actually found my old HD with Windows XP and Outlook 2003 installed, and I'm booting from it, testing all of this.
Because I'm running Outlook 2003, the link you sent actually worked. I changed it to the following:
typelibs = [ ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 2), ('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 2), ('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0, 1, 0), ]
When I ran setup_all.py this time, it appeared that all of the files were then in the build and distribution folders. Next up was install Inno Setup from around that time, and I ran spambayes.iss.
So close, but no cigar because I got the following error:
Compiler Error Line 125: Column 13: - [Error] (37:13) Unknown identifier 'convert_db'
The code looks like this in the spambayes.iss file:
function ConvertDatabase () : Boolean; begin Result : =convert_db ; end;
Any ideas?
Take care,
Erik Brown
-----Original Message----- From: Mark Hammond [mailto:skippy.hammond@gmail.com] Sent: Thursday, August 25, 2022 12:03 AM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
It looks like that's telling you Outlook 2000 isn't installed, which is probably expected.
See also https://mail.python.org/pipermail/spambayes-dev/2004-July/002938.html
But that's probably out of date too - you probably need to find the GUIDs in the registry editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib, or in Pythonwin's "com browser".
(Sadly I don't have office or outlook installed here, so can't tell you exactly what you need)
Mark
On 25/08/2022 1:48 pm, Erik M. Brown via spambayes-dev wrote:
Thank you all for the quick replys! So I'm not a dev, more of a power user, and I just added the python folder and script folder to the windows path. I then ran it in a CMD prompt, python setup_all.py, and it actually found the resources it needed. However, it ended up throwing a wild error:
ImportError: No module named 00062FFF-0000-C000-000000000046x0x9x0
LOL! BTW Matthew, what do you mean by copy the files? Do you mean the source files and you manually install the com addin?
Please let me know what you mean. = )
Take care,
Erik Brown
-----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Wednesday, August 24, 2022 7:37 PM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run "setup_all.py", the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check:
Are you sure that you're using a version of Python that's contemporaneous with the packaging?
You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes that's not what you want it to find?
Regards, Matt
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
Ok, thanks again for fast reply Mark I will stop here attempting to build binary. I now know how to install from source on different machines thanks you all. Erik M. Brown Get BlueMail for Android On Aug 25, 2022, 1:12 AM, at 1:12 AM, Mark Hammond <skippy.hammond@gmail.com> wrote:
I'm afraid I have no idea about that. It looks like I don't even have the latest spambayes source tree here, and don't even have svn to update it! My version does seem to correctly declare "convert_db" as a boolean, but I can't remember enough about inno to know what might be going wrong.
Spambayes was always capable of running from source, so in the first instance maybe try ignoring inno and follow the instructions in Outlook2000/README.txt?
HTH,
Mark
Bravo Mark...LOL!
So I actually found my old HD with Windows XP and Outlook 2003 installed, and I'm booting from it, testing all of this.
Because I'm running Outlook 2003, the link you sent actually worked. I changed it to the following:
typelibs = [ ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 2), ('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 2), ('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0, 1, 0), ]
When I ran setup_all.py this time, it appeared that all of the files were then in the build and distribution folders. Next up was install Inno Setup from around that time, and I ran spambayes.iss.
So close, but no cigar because I got the following error:
Compiler Error Line 125: Column 13: - [Error] (37:13) Unknown identifier 'convert_db'
The code looks like this in the spambayes.iss file:
function ConvertDatabase () : Boolean; begin Result : =convert_db ; end;
Any ideas?
Take care,
Erik Brown
-----Original Message----- From: Mark Hammond [mailto:skippy.hammond@gmail.com] Sent: Thursday, August 25, 2022 12:03 AM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
It looks like that's telling you Outlook 2000 isn't installed, which is probably expected.
See also https://mail.python.org/pipermail/spambayes-dev/2004-July/002938.html
But that's probably out of date too - you probably need to find the GUIDs in the registry editor under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib, or in Pythonwin's "com browser".
(Sadly I don't have office or outlook installed here, so can't tell you exactly what you need)
Mark
On 25/08/2022 1:48 pm, Erik M. Brown via spambayes-dev wrote:
Thank you all for the quick replys! So I'm not a dev, more of a
ImportError: No module named 00062FFF-0000-C000-000000000046x0x9x0
LOL! BTW Matthew, what do you mean by copy the files? Do you mean
Please let me know what you mean. = )
Take care,
Erik Brown
-----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Wednesday, August 24, 2022 7:37 PM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: Re: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py)
Eric,
Not sure if anyone is still reading this,
I am. And I still use SpamBayes every day.
but I'm running into an error when attempting to run
"setup_all.py",
the py2exe setup script, I get the following:
ImportError: No module named spambayes.resources (line 12 of setup_all.py)
But I don't install it that way. I just copy the files.
I'm able to run Spambayes from these source files in Outlook and have the correct python version, pywin32, as well as py2exe.
Here are a couple of things I'd check:
Are you sure that you're using a version of Python that's contemporaneous with the packaging?
You should be able to find the version of spambayes that setup_all.py is trying to use. Does it in fact have a directory called resources? Or is it possible that it's finding a directory called spambayes
On 25/08/2022 3:04 pm, Erik M. Brown via spambayes-dev wrote: power user, and I just added the python folder and script folder to the windows path. I then ran it in a CMD prompt, python setup_all.py, and it actually found the resources it needed. However, it ended up throwing a wild error: the source files and you manually install the com addin? that's not what you want it to find?
Regards, Matt
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
I'm afraid I have no idea about that. It looks like I don't even have the latest spambayes source tree here, and don't even have svn to update it!
Hi Mark, Good to see you're still around. The current SpamBayes source is on GitHub: https://github.com/smontanaro/spambayes My intent in moving it there was to do a proper Python 3 port, but I got distracted, in part because most demand is for Windows, and I don't do Windows... Skip
Hey Skip - good to see you still active too! Happy to see the github repo! Sadly the latest there still gives me no clues as to how `convert_db` is not working for Erik, and I doubt I'll get back into spambayes, but I'm really happy to see this activity! But-where's-tim-ly?, Mark On 25/8/2022 9:07 pm, Skip Montanaro wrote:
I'm afraid I have no idea about that. It looks like I don't even have the latest spambayes source tree here, and don't even have svn to update it!
Hi Mark,
Good to see you're still around. The current SpamBayes source is on GitHub:
https://github.com/smontanaro/spambayes
My intent in moving it there was to do a proper Python 3 port, but I got distracted, in part because most demand is for Windows, and I don't do Windows...
Skip
_______________________________________________ spambayes-dev mailing list spambayes-dev@python.org https://mail.python.org/mailman/listinfo/spambayes-dev
[Mark Hammond <skippy.hammond@gmail.com>]
But-where's-tim-ly?,
As always, lurking on the spambayes mailing lists ;-) It's been many years since I used Outlook, and gmail (which I've used ever since) has "good enough" spam detection - although I think spambayes did better for me! In any case, it must be well over a decade since I even looked at the code. Hey, Skip! Could you reset the spambayes-dev admin password to something trivial and mail it to me (then I'll log in and change it to something "secure")? I'm still the list owner, but somehow lost the password last year. Spam has been building up in the moderation queue ever since. _Legitmate_ moderated traffic to this list is non-existent, so I never bothered asking before. Or if someone else wants to volunteer to own this all-but-dead list, that would be fine too. Spambayes was a lot more fun when we were all working on it :-)
Roger that, I was assuming you were using the Outlook add-in. Take care, Erik Brown -----Original Message----- From: Matthew Dixon Cowles [mailto:matt@mondoinfo.com] Sent: Thursday, August 25, 2022 12:08 AM To: Erik M. Brown Cc: spambayes-dev@python.org Subject: RE: [spambayes-dev] ImportError: No module named spambayes.resources (line 12 of setup_all.py) Erik,
BTW Matthew, what do you mean by copy the files? Do you mean the source files and you manually install the com addin?
I do mean copying the Python source files. I'm not much of a Windows guy so I have only the most general idea of what a com addin is. Regards, Matt
participants (6)
-
Erik Brown -
Erik M. Brown -
Mark Hammond -
Matthew Dixon Cowles -
Skip Montanaro -
Tim Peters