So I'm using Microsoft Office 365 ProPlus on my Windows 10.
I wrote a python script that copies my emails from one account to the other and back.
My python version is 3.7.3
pywin32 version is 223
This script has worked totally fine for two months. A few days ago it suddenly stopped working. I investigated and got the following error:
pywintypes.com_error: (-2147352567, 'Ausnahmefehler aufgetreten.', (4096, 'Microsoft Outlook', 'Ein Fehler ist aufgetreten. MAPI-Fehlernummer: 80004001', None, 0, -2147467263), None)
I guess in English that would be
pywintypes.com_error: (-2147352567, 'Exception occured.', (4096, 'Microsoft Outlook', 'An error occured. MAPI-error-code: 80004001', None, 0, -2147467263), None)
This error occurs right at the beginning of my script when I try to execute
# imports
import win32com
import win32com.client
import datetime
Outlook = win32com.client.Dispatch("Outlook.Application")
ns = Outlook.GetNamespace("MAPI")
# connect to the shared calendar
recipient = ns.createRecipient(acc) # change to mail you want to get appointments from
resolved = recipient.Resolve()
appointments = ns.GetSharedDefaultFolder(recipient, 9).Items
I have no idea why ns.GetSharedDefaultFolder(recipient, 9).Items throws this error out of nowhere. Any tips?