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
Initializers of DefaultAzureCredential and SharedTokenCacheCredential raise ImportError when running Python 3.8 on Windows:
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from azure.identity import DefaultAzureCredential
>>> DefaultAzureCredential()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\3.8\lib\site-packages\azure\identity\_credentials\default.py", line 39, in __init__
SharedTokenCacheCredential(
File "C:\3.8\lib\site-packages\azure\identity\_credentials\user.py", line 136, in __init__
from msal_extensions.token_cache import WindowsTokenCache
File "C:\3.8\lib\site-packages\msal_extensions\__init__.py", line 7, in <module>
from .token_cache import WindowsTokenCache as TokenCache
File "C:\3.8\lib\site-packages\msal_extensions\token_cache.py", line 8, in <module>
from .cache_lock import CrossPlatLock
File "C:\3.8\lib\site-packages\msal_extensions\cache_lock.py", line 5, in <module>
import portalocker
File "C:\3.8\lib\site-packages\portalocker\__init__.py", line 4, in <module>
from . import portalocker
File "C:\3.8\lib\site-packages\portalocker\portalocker.py", line 9, in <module>
import win32file
ImportError: DLL load failed while importing win32file: The specified module could not be found.
No other credential is affected, so this can be worked around by substituting a specific component of DefaultAzureCredential such as ClientSecretCredential or EnvironmentCredential. SharedTokenCacheCredential, however, won't function on Python 3.8.
Update: with #8294, DefaultAzureCredential doesn't access the shared token cache on 3.8/win32 but otherwise functions normally. SharedTokenCacheCredential continues to raise ImportError on 3.8/win32.
Initializers of
DefaultAzureCredential
andSharedTokenCacheCredential
raiseImportError
when running Python 3.8 on Windows:No other credential is affected, so this can be worked around by substituting a specific component of
DefaultAzureCredential
such asClientSecretCredential
orEnvironmentCredential
.SharedTokenCacheCredential
, however, won't function on Python 3.8.The cause of this is tracked at mhammond/pywin32#1431
The text was updated successfully, but these errors were encountered: