azure-sdk-for-python
azure-sdk-for-python copied to clipboard
[BUG Bash] When i import libary using python3.9 mac occured error
>>> from azure.storage.fileshare import (
... generate_account_sas,
... ResourceTypes,
... AccountSasPermissions
... )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/azure/storage/fileshare/__init__.py", line 8, in <module>
from ._file_client import ShareFileClient
File "/usr/local/lib/python3.9/site-packages/azure/storage/fileshare/_file_client.py", line 30, in <module>
from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query
File "/usr/local/lib/python3.9/site-packages/azure/storage/fileshare/_shared/base_client.py", line 40, in <module>
from .authentication import SharedKeyCredentialPolicy
File "/usr/local/lib/python3.9/site-packages/azure/storage/fileshare/_shared/authentication.py", line 22, in <module>
from azure.core.pipeline.transport import AioHttpTransport
File "<frozen importlib._bootstrap>", line 1055, in _handle_fromlist
File "/Users/i544731/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/transport/__init__.py", line 68, in __getattr__
from ._aiohttp import AioHttpTransport
File "/Users/i544731/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/transport/_aiohttp.py", line 35, in <module>
import aiohttp
File "/usr/local/lib/python3.9/site-packages/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/local/lib/python3.9/site-packages/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/local/lib/python3.9/site-packages/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str
Label prediction was below confidence level 0.6 for Model:CategoryLabels: 'Client:0.5686399,Mgmt:0.42980742,Service:0.000963137'
Hi @JayChanggithub thanks for the feedback, we'll get back to you asap.
Hi @JayChanggithub Jay, one quick thing to try is to update your aiohttp. Can you please try updating aiohttp and seeing if the problem persists?
If so, can you please provide the following so that we may better assist you:
- Code sample (please ensure to redact sensitive information)
- What is the Package Version of
azure.storage.fileshareyou are using?
In general, here are some tips that may help you resolve the issue in the meantime:
- Use the latest Package Version (when possible)
- Check your read/write permissions to the container you are attempting to access
- I see that you are importing
generate_account_sas, so it may be a good idea to double check your permissions that your generated SAS token includes and that the token has not expired
Hopefully one of the above suggestions will help you resolve your issue, otherwise please provide a follow up comment with the additional information requested. Thanks!
@vincenttran-msft Thanks for your replying. Sure. I will try to update aiohttp. In addition my azure.storage.fileshare is azure-storage-file-share==12.9.0. Also i have admin permission access of storage account when i try to execute generate SAS token i use from storage account key to do.
Hi @JayChanggithub. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.