[Spambayes]
[ spambayes-Bugs-680158 ] Outlook addin cannot create new database
SourceForge.net
noreply at sourceforge.net
Sat Feb 8 17:28:55 EST 2003
Bugs item #680158, was opened at 2003-02-05 01:53
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=680158&group_id=61702
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Duncan Booth (duncanb)
Assigned to: Nobody/Anonymous (nobody)
Summary: Outlook addin cannot create new database
Initial Comment:
Outlook2000\manager.py, revision 1.42 contains this
code:
def new_bayes(self):
# Just delete the file and do an "open"
try:
os.unlink(self.bayes_filename)
except IOError, e:
if e.errno != errno.ENOENT: raise
return self.open_bayes()
Python 2.2 under windows raises OSError when
os.unlink fails, so this code should be:
def new_bayes(self):
# Just delete the file and do an "open"
try:
os.unlink(self.bayes_filename)
except (OSError,IOError), e:
if e.errno != errno.ENOENT: raise
return self.open_bayes()
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2003-02-09 14:28
Message:
Logged In: YES
user_id=552329
I get this too, and the fix works for me. Here's a complete
trace from running addin.py (fresh CVS) to the error when
launching Outlook.
Outlook Spam Addin module loading
SpamAddin - Connecting to Outlook
Created new configuration file 'D:\spambayes\Outlook2000
\default_configuration.pck'
Loaded bayes database from 'D:\spambayes\Outlook2000
\default_bayes_database.pck'
Either bayes database or message database is missing -
creating new
Traceback (most recent call last):
File "D:\Python22\lib\site-packages\win32com\universal.py",
line 150, in dispatch
retVal = ob._InvokeEx_(meth.dispid, 0,
pythoncom.DISPATCH_METHOD, args, None, None)
File "D:\Python22\lib\site-
packages\win32com\server\policy.py", line 322, in _InvokeEx_
return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
serviceProvider)
File "D:\Python22\lib\site-
packages\win32com\server\policy.py", line 562, in _invokeex_
return DesignatedWrapPolicy._invokeex_( self, dispid, lcid,
wFlags, args, kwArgs, serviceProvider)
File "D:\Python22\lib\site-
packages\win32com\server\policy.py", line 510, in _invokeex_
return apply(func, args)
File "D:\spambayes\Outlook2000\addin.py", line 615, in
OnConnection
self.manager = manager.GetManager(application)
File "D:\spambayes\Outlook2000\manager.py", line 419, in
GetManager
_mgr = BayesManager(outlook=outlook, verbose=verbose)
File "D:\spambayes\Outlook2000\manager.py", line 158, in
__init__
self.LoadBayes()
File "D:\spambayes\Outlook2000\manager.py", line 265, in
LoadBayes
self.InitNewBayes()
File "D:\spambayes\Outlook2000\manager.py", line 314, in
InitNewBayes
self.bayes = self.db_manager.new_bayes()
File "D:\spambayes\Outlook2000\manager.py", line 87, in
new_bayes
os.unlink(self.bayes_filename)
exceptions.OSError: [Errno 2] No such file or
directory: 'D:\spambayes\Outlook2000
\default_bayes_database.pck'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=680158&group_id=61702
More information about the Spambayes
mailing list