You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to connect to our EWS Exchange 2019 server, we came across this error- ValueError: Full name for API version Exchange2016 build 15.2.1118.26 is unknown
This error only appears when running in debug mode , which makes sense as it comes from a log.debug() statement.
After some research, we saw the behavior where Exchange 2019 servers only connect when identifying with other versions (like 2016) has been occurring for other users as well (#927)
We saw in the code there is a retry mechanism to connect with different versions, so our connection is successful with 2016, making this error not exactly align with the methodology.
Full stack trace (without our initial internal code call) -
File "/usr/local/lib/python3.10/site-packages/exchangelib/services/common.py", line 308, in _get_elements
yield from self._response_generator(payload=payload)
File "/usr/local/lib/python3.10/site-packages/exchangelib/services/common.py", line 271, in _response_generator
response = self._get_response_xml(payload=payload)
File "/usr/local/lib/python3.10/site-packages/exchangelib/services/common.py", line 415, in _get_response_xml
self._update_api_version(api_version=api_version, header=header, **parse_opts)
File "/usr/local/lib/python3.10/site-packages/exchangelib/services/common.py", line 462, in _update_api_version
log.debug("Found new version (%s -> %s)", self._version_hint, head_version)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1465, in debug
self._log(DEBUG, msg, args, **kwargs)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1624, in _log
self.handle(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1634, in handle
self.callHandlers(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 968, in handle
self.emit(record)
File "<string>", line 8502, in emit
File "/usr/local/lib/python3.10/logging/__init__.py", line 943, in format
return fmt.format(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 678, in format
record.message = record.getMessage()
File "/usr/local/lib/python3.10/logging/__init__.py", line 368, in getMessage
msg = msg % self.args
File "/usr/local/lib/python3.10/site-packages/exchangelib/version.py", line 269, in __str__
return f"Build={self.build}, API={self.api_version}, Fullname={self.fullname}"
File "/usr/local/lib/python3.10/site-packages/exchangelib/version.py", line 173, in fullname
raise ValueError(f"Full name for API version {self.api_version} build {self.build} is unknown")
ValueError: Full name for API version Exchange2016 build 15.2.1118.26 is unknown
I'm using Exchangelib 5.0.2 and python 3
If anyone comes across this and needs a patch - overriding the fullname function in the following manner removes the error-
from exchangelib.version import VERSIONS as EXC_VERSIONS
def our_fullname(self):
for build, api_version, full_name in EXC_VERSIONS:
if self.build:
if self.build.major_version != build.major_version:
continue
if self.api_version == api_version:
return full_name
Version.fullname = our_fullname
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to connect to our EWS Exchange 2019 server, we came across this error-
ValueError: Full name for API version Exchange2016 build 15.2.1118.26 is unknown
This error only appears when running in debug mode , which makes sense as it comes from a log.debug() statement.
After some research, we saw the behavior where Exchange 2019 servers only connect when identifying with other versions (like 2016) has been occurring for other users as well (#927)
We saw in the code there is a retry mechanism to connect with different versions, so our connection is successful with 2016, making this error not exactly align with the methodology.
Full stack trace (without our initial internal code call) -
I'm using Exchangelib 5.0.2 and python 3
If anyone comes across this and needs a patch - overriding the fullname function in the following manner removes the error-
The text was updated successfully, but these errors were encountered: