exchangelib.errors.ErrorFolderNotFound: No subfolder with name 'SUBFOLDER NAME' #1286
-
I have a web application built on exchangelib that retrieves task items. The app runs 24/7 and has worked great since august of 2023. As of this week the web app suddenly started encountering this error: " raise ErrorFolderNotFound(f"No subfolder with name {other!r}") The code hasn't changed in months, neither has the folder "SUBFOLDER NAME" or any of the properties associated with the folder. The folder is in my public folders root. I also haven't updated exchangelib since August, it is currently running exchangelib version 5.0.3. Any ideas as to why this is happening? Additionally, after printing out child_folder_count for my public folders root it confirms that there are 2 child folders which can be found in the picture commented below. I've also tried accessing the other folder, "SUBFOLDER NAME2" and I am given the same error: " raise ErrorFolderNotFound(f"No subfolder with name {other!r}") When I try printing out the tree of my public folders using "print(account.public_folders_root.tree())" I get this output: Here is the XML Logs: Request XML: <?xml version='1.0' encoding='utf-8'?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<s:Header>
<t:RequestServerVersion Version="Exchange2016"/>
<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time"/>
</t:TimeZoneContext>
</s:Header>
<s:Body>
<m:GetFolder>
<m:FolderShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="folder:DisplayName"/>
<t:FieldURI FieldURI="folder:FolderClass"/>
<t:FieldURI FieldURI="folder:PermissionSet"/>
</t:AdditionalProperties>
</m:FolderShape>
<m:FolderIds>
<t:FolderId Id="" ChangeKey=""/>
<t:FolderId Id="" ChangeKey=""/>
</m:FolderIds>
</m:GetFolder>
</s:Body>
</s:Envelope> Response XML: <?xml version='1.0' encoding='utf-8'?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="7409" MinorBuildNumber="31" Version="V2018_01_08"/>
</s:Header>
<s:Body>
<m:GetFolderResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="" ChangeKey=""/>
<t:FolderClass>IPF.Note</t:FolderClass>
<t:DisplayName>SUBFOLDER NAME2</t:DisplayName>
</t:Folder>
</m:Folders>
</m:GetFolderResponseMessage>
<m:GetFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="" ChangeKey=""/>
<t:DisplayName>SUBFOLDER NAME</t:DisplayName>
</t:Folder>
</m:Folders>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope> Traceback (most recent call last):
File "", line 250, in home
fParent = fPublic / fTB
~~~~~~~~^~~~~
File "/usr/local/lib/python3.11/site-packages/exchangelib/folders/base.py", line 783, in __truediv__
raise ErrorFolderNotFound(f"No subfolder with name {other!r}")
exchangelib.errors.ErrorFolderNotFound: No subfolder with name 'SUBFOLDER NAME' |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
The response XML indicates that the subfolder in question is returned (plus another one with almost the same name). I would go into exchangelib/folders/base.py line 783 and add a |
Beta Was this translation helpful? Give feedback.
-
Honestly due to my incompetence with python debugger I am not too sure what to check for once we get to this breakpoint to further debug. |
Beta Was this translation helpful? Give feedback.
-
i have same problem. here |
Beta Was this translation helpful? Give feedback.
-
This issue is related to #1273 . A temporary workaround to this issue can be used as follows until a exchangelib update is released to address this issue:
|
Beta Was this translation helpful? Give feedback.
This issue is related to #1273 . A temporary workaround to this issue can be used as follows until a exchangelib update is released to address this issue: