I'm experiencing issues suddenly after updating to python 3.11, getting "Valid url scheme and host required" when trying to use the GraphServiceClient
I think I have narrowed it down to some strange handling of enums in graph_client_factory.py in _get_base_url in the f-string handling of enums
Running the following code:
from enum import Enum
class NationalClouds(str, Enum):
Global = 'https://graph.microsoft.com'
print("print:", NationalClouds.Global)
print(f"f-string: {NationalClouds.Global}")
print("%%-formatting: %s" % NationalClouds.Global)
Yields
print: NationalClouds.Global
f-string: https://graph.microsoft.com
%-formatting: NationalClouds.Global
In 3.10 and earlier, but
print: NationalClouds.Global
f-string: NationalClouds.Global
%-formatting: NationalClouds.Global
So my base URL is being set to NationalClouds.Global/APIVersion.v1/
I don't feel confident in fixing this myself, but would like if anyone has any input on my issue.
I'm experiencing issues suddenly after updating to python 3.11, getting "Valid url scheme and host required" when trying to use the
GraphServiceClientI think I have narrowed it down to some strange handling of enums in graph_client_factory.py in
_get_base_urlin the f-string handling of enumsRunning the following code:
Yields
In 3.10 and earlier, but
So my base URL is being set to
NationalClouds.Global/APIVersion.v1/I don't feel confident in fixing this myself, but would like if anyone has any input on my issue.