[spambayes-dev] Any thoughts on this exception?

Mark Hammond mhammond at skippinet.com.au
Thu Dec 14 11:29:29 EST 2023


That exception looks more like we can't access the message store rather 
than a 64/32 bit mismatch. It may be that you need to enable MAPI access 
or something similar but I'm afraid I've never used newer versions of 
office. Googling for MAPI_E_INVALID_ENTRYID with Office 365 is probably 
the best path forward.

Cheers,

Mark

On 2023-12-13 11:37 p.m., John Cherney wrote:
>
> I’ve made some progress. I’ve cloned smontanaro’s spambayes repo and 
> used that as a starting point. I think I’ve gotten most, of the 2.x to 
> 3.x conversions. I have the Add-in registered. I have the Add-ins menu 
> showing up. But (and there has to be a ‘but’) I can’t seem to get the 
> win32com mapi to read anything meaningful. I haven’t seen anything 
> helpful in my Google searches. I’m throwing this out there hoping that 
> someone has seen something like this and can get me unstuck.
>
> Loaded bayes database from 'C:\<redacted>\default_bayes_database.fs'
>
> Loaded message database from 'C:\<redacted>\default_message_database.fs'
>
> Bayes database initialized with 0 spam and 0 good messages
>
> SpamBayes Outlook Addin Version 2.0a1 (Aug 25, 2022) from source
>
> on Windows 10.0.19045 ()
>
> using Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct  2 2023, 13:03:39) [MSC 
> v.1935 64 bit (AMD64)]
>
> Log created Wed Dec 13 22:53:24 2023
>
> *** SpamBayes is NOT enabled, so will not filter incoming mail. ***
>
> Creating new SpamBayes toolbar to host our buttons
>
> Error finding the MAPI folders for a folder switch event
>
> ERROR: 'There appears to be a problem with the SpamBayes 
> configuration\r\n\r\nPlease select the SpamBayes manager, and run 
> the\r\nConfiguration Wizard to reconfigure the filter.'
>
> Traceback (most recent call last):
>
> File "C:\<redacted>\spambayes\Outlook2000\msgstore.py", line 347, in 
> GetFolder
>
> folder = self._OpenEntry(folder_id)
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> File "C:\<redacted>\spambayes\Outlook2000\msgstore.py", line 274, in 
> _OpenEntry
>
> store = self._GetMessageStore(store_id)
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> File "C:\<redacted>\spambayes\Outlook2000\msgstore.py", line 247, in 
> _GetMessageStore
>
> store = self.session.OpenMsgStore(
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> pywintypes.com_error: (-2147221241, 'OLE error 0x80040107', None, None)
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
> File "C:\<redacted>\spambayes\Outlook2000\addin.py", line 1178, in 
> OnFolderSwitch
>
> mapi_folder = self.manager.message_store.GetFolder(outlook_folder)
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> File "C:\<redacted>\spambayes\Outlook2000\msgstore.py", line 355, in 
> GetFolder
>
> raise MsgStoreExceptionFromCOMException(details)
>
> msgstore.MsgStoreException: MsgStoreException: Exception 0x-7ffbfef9 
> (MAPI_E_INVALID_ENTRYID): OLE error 0x80040107
>
> ERROR: 'There appears to be a problem with the SpamBayes 
> configuration\r\n\r\nPlease select the SpamBayes manager, and run 
> the\r\nConfiguration Wizard to reconfigure the filter.'
>
> One thing I’m suspicious of (and I hope I’m wrong) is if the problem 
> is the win32 related modules. I’m doing this on a 64bit machine, 
> trying to get this to work with the 64bit install of Outlook (Office 
> 365). Could that be my problem? Should I be looking for win64 related 
> modules? (Do any exist? I didn’t see any on pypi.org? Or is that also 
> a wrong direction?) At this point, I don’t know enough about COM or 
> 32bit vs 64bit to know what to try next.
>
> Thanks in advance,
>
> jwc
>
>
> _______________________________________________
> spambayes-dev mailing list
> spambayes-dev at python.org
> https://mail.python.org/mailman/listinfo/spambayes-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/spambayes-dev/attachments/20231214/76936f75/attachment-0001.html>


More information about the spambayes-dev mailing list