Hi all, Mark replied to my recent message on installation problems in private, and I replied back in private... since there's been activity from Mark on the list but no reply to that e-mail, I'll take the liberty of continuing this one on the list. The basics again: - I first discovered the problem in the 002 binary, but it does repro in the 003. - both repro machines run Outlook 2K CZ - one runs W98SE CZ and the other W2K CZ - Reproduced in W2K under both CZ-CZ locale and EN-US regional settings - Addin joins the list in Outlook after installation, but cannot be successfully activated - each return to the COM add-ins dialog finds it unchecked. - The original report was for W2K CZ / binary 2; see the list a few days back for details. - Here is the behavior for W98SE/CZ regional settings/binary 3: Error connecting to Outlook! Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) ERROR: 'There was an error initializing the SpamBayes addin\r\n\r\nPlease re- start Outlook and try again.' Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) SpamBayes - Disconnecting from Outlook Addin terminating: 0 COM client and 1 COM servers exist. - the error with 003 on W2K was, as far as I can recall, mostly the same, except for the "can't decode byte XXXX" - a different byte was cited, AFAICR. Erik Piper
It would seem to me that either the profile name, or the "application directory" name is what is giving us problems. If you have Python 2.3 available for the machine, we could perform some experiments to help move us closer. Mark.
-----Original Message----- From: spambayes-bounces@python.org [mailto:spambayes-bounces@python.org]On Behalf Of erik@sky.cz Sent: Friday, 4 July 2003 10:59 PM To: spambayes@python.org Cc: erik@sky.cz Subject: [Spambayes] Re: Spambayes Digest, Vol 59, Issue 9
Hi all,
Mark replied to my recent message on installation problems in private, and I replied back in private... since there's been activity from Mark on the list but no reply to that e-mail, I'll take the liberty of continuing this one on the list.
The basics again: - I first discovered the problem in the 002 binary, but it does repro in the 003. - both repro machines run Outlook 2K CZ - one runs W98SE CZ and the other W2K CZ - Reproduced in W2K under both CZ-CZ locale and EN-US regional settings - Addin joins the list in Outlook after installation, but cannot be successfully activated - each return to the COM add-ins dialog finds it unchecked. - The original report was for W2K CZ / binary 2; see the list a few days back for details. - Here is the behavior for W98SE/CZ regional settings/binary 3: Error connecting to Outlook! Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) ERROR: 'There was an error initializing the SpamBayes addin\r\n\r\nPlease re- start Outlook and try again.' Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) SpamBayes - Disconnecting from Outlook Addin terminating: 0 COM client and 1 COM servers exist. - the error with 003 on W2K was, as far as I can recall, mostly the same, except for the "can't decode byte XXXX" - a different byte was cited, AFAICR.
Erik Piper
_______________________________________________ Spambayes mailing list Spambayes@python.org http://mail.python.org/mailman/listinfo/spambayes
I don't have Python yet, because I'd been hoping to get by with just the binary -- I'm not good at getting up and running on programming languages. But I'll be happy to help in the name of science. I've started the download, rates are cheap now, so I'll probably download it all now. Let me know what kind of experiments I should run. I noticed the Python 2.3b engine is a beta -- anything really odd in its behavior (from the standpoint of a layman) I'll need to know about? For the moment, here's some info on the profile name and application directory Profile name: I hope this is the same as an "account"... it's been a long time since I worked in English Outlook. I have just one account on my home machine, and it's a dialup account named mail.sky.cz. "Application directory" -- here are some wild stabs... Directory where application is located: C:\program files\microsoft office\office\ The "Application Data" root directory in Czech Win2K is localized, and thus C:\documents and settings\<username - in this case administrator>\Data aplikací. (In case the diacritical marks don't come through right: the last character is an i with an acute accent.) Note that the Addins subdirectory's name is also localized, and the localized name includes one of the technically more troublesome characters in Czech: an n with a hacek. By "technically most troublesome," I am referring to the fact that generally, if an application handles Czech accented characters well, but has trouble with just a few, n-with-hacek is among those few. Thanks a lot for your help! Erik -----Original Message----- From: Mark Hammond [mailto:mhammond@skippinet.com.au] Sent: Saturday, July 05, 2003 1:49 AM To: erik@sky.cz; spambayes@python.org Subject: RE: [Spambayes] Re: Spambayes Digest, Vol 59, Issue 9 It would seem to me that either the profile name, or the "application directory" name is what is giving us problems. If you have Python 2.3 available for the machine, we could perform some experiments to help move us closer. Mark.
-----Original Message----- From: spambayes-bounces@python.org [mailto:spambayes-bounces@python.org]On Behalf Of erik@sky.cz Sent: Friday, 4 July 2003 10:59 PM To: spambayes@python.org Cc: erik@sky.cz Subject: [Spambayes] Re: Spambayes Digest, Vol 59, Issue 9
Hi all,
Mark replied to my recent message on installation problems in private, and I replied back in private... since there's been activity from Mark on the list but no reply to that e-mail, I'll take the liberty of continuing this one on the list.
The basics again: - I first discovered the problem in the 002 binary, but it does repro in the 003. - both repro machines run Outlook 2K CZ - one runs W98SE CZ and the other W2K CZ - Reproduced in W2K under both CZ-CZ locale and EN-US regional settings - Addin joins the list in Outlook after installation, but cannot be successfully activated - each return to the COM add-ins dialog finds it unchecked. - The original report was for W2K CZ / binary 2; see the list a few days back for details. - Here is the behavior for W98SE/CZ regional settings/binary 3: Error connecting to Outlook! Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) ERROR: 'There was an error initializing the SpamBayes addin\r\n\r\nPlease re- start Outlook and try again.' Traceback (most recent call last): File "out1.pyz/addin", line 800, in OnConnection File "out1.pyz/manager", line 682, in GetManager File "out1.pyz/manager", line 226, in __init__ File "out1.pyz/manager", line 487, in LoadConfig File "out1.pyz/ntpath", line 101, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 9: ordinal not in range(128) SpamBayes - Disconnecting from Outlook Addin terminating: 0 COM client and 1 COM servers exist. - the error with 003 on W2K was, as far as I can recall, mostly the same, except for the "can't decode byte XXXX" - a different byte was cited, AFAICR.
Erik Piper
_______________________________________________ Spambayes mailing list Spambayes@python.org http://mail.python.org/mailman/listinfo/spambayes
Erik> Let me know what kind of experiments I should run. I can think of a couple things you might try. First, if execute the Python interpreter from a DOS shell what is your default encoding (I suspect ascii): import sys print sys.getdefaultencoding() Second, I'd like to know what the arguments are to the ntpath.join() function. The character with ordinal 0xed (an accented 'i') is clearly not an ASCII character, yet the error message suggests ntpath.join is being passed string objects not Unicode objects. In Outlook2000/manager.py you should see a bit of code at the start of LoadConfig like this: def LoadConfig(self): profile_name = self.message_store.GetProfileName() if profile_name is None: # should only happen in source-code versions - older win32alls can't # determine this. profile_name = "unknown_profile" else: # xxx - remove me sometime - win32all grew this post 154(ish) # binary never released with this, so we can be a little more brutal # Try and rename to current profile, silent failure try: os.rename(os.path.join(self.data_directory, "unknown_profile.ini"), os.path.join(self.data_directory, profile_name + ".ini")) except os.error: pass One of those two os.path.join (aka ntpath.join on Windows) calls is what's failing. It would appear either your data directory or your chosen profile name contains an accented 'i'. One or both should be Unicode objects, not strings. If your system has filenames which contain non-ASCII characters I suspect your system's default encoding needs to be set properly in c:\Python23\site.py. Skip
[Skip]
Erik> Let me know what kind of experiments I should run.
I can think of a couple things you might try. First, if execute the Python interpreter from a DOS shell what is your default encoding (I suspect ascii):
import sys print sys.getdefaultencoding()
Second, I'd like to know what the arguments are to the ntpath.join() function.
The arguments should be the literal strings in the source, plus the result of:
from win32com.shell import shell, shellcon shell.SHGetFolderPath(0,shellcon.CSIDL_APPDATA,0,0) u'E:\\Documents and Settings\\skip\\Application Data'
Which is unicode - so the extended characters "should" work. Note that Python 2.3 has grown support for Unicode filenames - hence I am quite keen to know why this is broken. Even though: The character with ordinal 0xed (an accented 'i')
is clearly not an ASCII character, yet the error message suggests ntpath.join is being passed string objects not Unicode objects. In Outlook2000/manager.py you should see a bit of code at the start of LoadConfig like this:
def LoadConfig(self): profile_name = self.message_store.GetProfileName() if profile_name is None: # should only happen in source-code versions - older win32alls can't # determine this. profile_name = "unknown_profile" else: # xxx - remove me sometime - win32all grew this post 154(ish) # binary never released with this, so we can be a little more brutal # Try and rename to current profile, silent failure try: os.rename(os.path.join(self.data_directory, "unknown_profile.ini"), os.path.join(self.data_directory, profile_name + ".ini")) except os.error: pass
One of those two os.path.join (aka ntpath.join on Windows) calls is what's failing. It would appear either your data directory or your chosen profile name contains an accented 'i'. One or both should be Unicode objects, not strings. If your system has filenames which contain non-ASCII characters I suspect your system's default encoding needs to be set properly in c:\Python23\site.py.
Skip
Dear SpamBayes team, I'm the fellow who was working in a Czech environment, ran into SpamBayes crashing and burning on Czech characters, started asking questions on the list, and eventually stopped asking (too frustrated and too embarrassed at my ignorance within Python, though I still apologize for the unannounced disappearance). Today I downloaded version 8 of the plugin, first at work and at home, and found somewhat more promising, but still not perfect, results. Work computer (W98SE CZ, Outlook 2K CZ): ABSOLUTELY no problems at ALL. Home computer (W2K CZ, Outlook 2K CZ): Installation fine, startup fine. But: 1. clicking the Data Folder button in the Advanced tab leads to an error dialog: SpamBayes 'ascii' codec can't encode character u'\xed' in position 52: ordinal not in range(128) In the old discussions on this matter, the SpamBayes team noted that the guilty character (and this here seems to be the same one) was an accented i, which is contained in the Application Data folder in Czech Windows 2000. (I'm not sure about Win98 SE; it may have an unlocalized app. data folder name.) 2. When running Spambayes' Configuration Wizard using the "I have sorted..." option (though NOT when using the other two options), the same error message as mentioned above appears after the last step of the wizard is complete, i.e. just before jumping back into the SpamBayes manager's main dialog. 3. Attempts to use the Training tab to train SpamBayes based on designated spam/ham folders soft-hang during the "Saving: Writing to Database..." step. By "soft-hang," I mean that Outlook does not become hung, but the "Saving: Writing to database..." message remains until you switch tabs/close the dialog, and more importantly, a check of the Training database status after the training reveals no change to the sizes of the trained-ham and trained-spam counts. It sounds to me, as a layman, as if SpamBayes is having trouble getting to its own database due to problem 1 above. 4. The "Delete as Spam" and "Recover from "Spam" buttons have no effect. Interestingly, I have somehow managed to get 32 messages trained as ham, or so the Training Database Status tells me. Probably in the course of moving things about during setup, before I discovered that SpamBayes was not working as well as I had thought. I know you've solved a lot of problems related to Unicode so far; hopefully you'll be able to resolve this one as well. As usual I am available for testing. Though the mere thought of messing around with actual python scripts again makes my head spin, there's no end to what I'd do in the name of science. I guess. Cheers and thanks in advance, Erik Piper
"Erik Piper" wrote
Home computer (W2K CZ, Outlook 2K CZ): Installation fine, startup fine. But: 1. clicking the Data Folder button in the Advanced tab leads to an error dialog: SpamBayes 'ascii' codec can't encode character u'\xed' in position 52: ordinal no t in range(128)
Can you post the entire traceback here? Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
Sure, Anthony. Shame I didn't remember to do so in the first place. Exception in thread Thread-1: Traceback (most recent call last): File "out1.pyz/threading", line 436, in __bootstrap File "out1.pyz/threading", line 416, in run File "out1.pyz/dialogs.async_processor", line 226, in thread_target File "out1.pyz/train", line 169, in trainer File "out1.pyz/manager", line 311, in Adopt File "out1.pyz/shutil", line 170, in move File "out1.pyz/shutil", line 83, in copy2 File "out1.pyz/shutil", line 58, in copystat UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 52: ordinal not in range(128) The precise same footprint in the traceback arises when I repro the "soft hang" of training in the Training tab, mentioned in the original e-mail. At the risk of supplying useless information, here's the log from stepping through the configuration wizard: (...prelude...) Loaded bayes database from 'C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\default_bayes_database.db' Loaded message database from 'C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\default_message_database.db' Bayes database initialized with 2 spam and 72 good messages *** - message database has 44 messages - bayes has 74 - something is screwey (...) GetNextPage with current 0 IDD_WIZARD_WELCOME GetNextPage with current 3 IDD_WIZARD_FOLDERS_TRAIN About to train with really_really_long_string_of_gobbledygook Checked 72 in folder Ham - 72 new entries found. Checked 2 in folder Junk E-Mail - 2 new entries found. GetNextPage with current 4 IDD_WIZARD_TRAIN GetNextPage with current 1 IDD_WIZARD_FOLDERS_WATCH GetNextPage with current 2 IDD_WIZARD_FOLDERS_REST Wizard Done! Saving wizard changes Saving configuration -> C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\Microsoft Outlook Internet Settings.ini In other words, even though Spambayes throws me an error dialog, no event is logged. By the way, I can no longer repro the failure of the "Recover from Spam" and "Delete as Spam" buttons; if I can confirm a set of repro steps in the future, I'll let y'all know. Erik Piper -----Original Message----- From: Anthony Baxter [mailto:anthony@interlink.com.au] Sent: Tuesday, November 04, 2003 10:52 AM To: Erik Piper Cc: spambayes@python.org Subject: Re: [Spambayes] Spambayes - a few more steps forward in Czech in plugin 0081
"Erik Piper" wrote
Home computer (W2K CZ, Outlook 2K CZ): Installation fine, startup fine. But: 1. clicking the Data Folder button in the Advanced tab leads to an error dialog: SpamBayes 'ascii' codec can't encode character u'\xed' in position 52: ordinal no t in range(128)
Can you post the entire traceback here? Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
Thanks Erik, We are tracking this in https://sourceforge.net/tracker/index.php?func=detail&aid=835435&group_id=61 702&atid=498103 - see a potential work-around in that bug. I will be able to fix this for the next release. Mark.
-----Original Message----- From: spambayes-bounces@python.org [mailto:spambayes-bounces@python.org]On Behalf Of Erik Piper Sent: Wednesday, 5 November 2003 4:52 AM To: spambayes@python.org Subject: RE: [Spambayes] Spambayes - a few more steps forward in Czech inplugin 0081
Sure, Anthony. Shame I didn't remember to do so in the first place.
Exception in thread Thread-1: Traceback (most recent call last): File "out1.pyz/threading", line 436, in __bootstrap File "out1.pyz/threading", line 416, in run File "out1.pyz/dialogs.async_processor", line 226, in thread_target File "out1.pyz/train", line 169, in trainer File "out1.pyz/manager", line 311, in Adopt File "out1.pyz/shutil", line 170, in move File "out1.pyz/shutil", line 83, in copy2 File "out1.pyz/shutil", line 58, in copystat UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 52: ordinal not in range(128)
The precise same footprint in the traceback arises when I repro the "soft hang" of training in the Training tab, mentioned in the original e-mail.
At the risk of supplying useless information, here's the log from stepping through the configuration wizard:
(...prelude...) Loaded bayes database from 'C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\default_bayes_database.db' Loaded message database from 'C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\default_message_database.db' Bayes database initialized with 2 spam and 72 good messages *** - message database has 44 messages - bayes has 74 - something is screwey
(...)
GetNextPage with current 0 IDD_WIZARD_WELCOME GetNextPage with current 3 IDD_WIZARD_FOLDERS_TRAIN About to train with really_really_long_string_of_gobbledygook Checked 72 in folder Ham - 72 new entries found. Checked 2 in folder Junk E-Mail - 2 new entries found. GetNextPage with current 4 IDD_WIZARD_TRAIN GetNextPage with current 1 IDD_WIZARD_FOLDERS_WATCH GetNextPage with current 2 IDD_WIZARD_FOLDERS_REST Wizard Done! Saving wizard changes Saving configuration -> C:\Documents and Settings\Administrator\Data aplikaci\SpamBayes\Microsoft Outlook Internet Settings.ini
In other words, even though Spambayes throws me an error dialog, no event is logged.
By the way, I can no longer repro the failure of the "Recover from Spam" and "Delete as Spam" buttons; if I can confirm a set of repro steps in the future, I'll let y'all know.
Erik Piper
-----Original Message----- From: Anthony Baxter [mailto:anthony@interlink.com.au] Sent: Tuesday, November 04, 2003 10:52 AM To: Erik Piper Cc: spambayes@python.org Subject: Re: [Spambayes] Spambayes - a few more steps forward in Czech in plugin 0081
"Erik Piper" wrote
Home computer (W2K CZ, Outlook 2K CZ): Installation fine, startup fine. But: 1. clicking the Data Folder button in the Advanced tab leads to an error dialog: SpamBayes 'ascii' codec can't encode character u'\xed' in position 52: ordinal no t in range(128)
Can you post the entire traceback here?
Anthony
-- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
_______________________________________________ Spambayes@python.org http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html
participants (5)
-
Anthony Baxter -
Erik Piper -
erik@sky.cz -
Mark Hammond -
Skip Montanaro