[BUG] AttributeError: module 'azure.functions._abc' has no attribute 'SqlRow'
See original GitHub issueI think #1029 might need to be re-opened.
- Timestamp: 2022-06-16 -> 2022-06-17
- Function App name: anomalyScoring
- Function name(s) (as appropriate): there is only one on that function app
- Core Tools version: 4?
Repro steps
Provide the steps required to reproduce the problem:
Have a perfectly good, deployed function. It starts failing after no changes from us with the error:
Result: Failure Exception: AttributeError: module 'azure.functions._abc' has no attribute 'SqlRow'
Known workarounds
Provide a description of any known workarounds.
Redeploying resolved the issue.
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
@@ -0,0 +1,9 @@
# DO NOT include azure-functions-worker in this file
# The Python Worker is managed by Azure Functions platform
# Manually managing azure-functions-worker may cause unexpected issues
azure-functions
pandas
numpy
scikit-learn
matplotlib
Seems exactly like #1029. The first time my production service went down because of this I was annoyed. But mistakes happen. The fact that we are getting this exact same issue again is pretty unacceptable. I know the guidance is:
# DO NOT include azure-functions-worker in this file
# The Python Worker is managed by Azure Functions platform
# Manually managing azure-functions-worker may cause unexpected issues
but I would like to know how I can lock onto a functioning version of the worker so yall can’t keep breaking my production workloads.
Stacktrace
Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: Failure Exception: AttributeError: module 'azure.functions._abc' has no attribute 'SqlRow' Stack:
File'/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py', line 324, in _handle__function_load_request ExtensionManager.function_load_extension(
File'/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/wrappers.py', line 16, in call return func(*args, **kwargs)
File'/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/extension.py', line 65, in function_load_extension sdk = cls._try_get_sdk_with_extension_enabled()
File'/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/extension.py', line 225, in _try_get_sdk_with_extension_enabled sdk = get_sdk_from_sys_path()
File'/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/common.py', line 121, in get_sdk_from_sys_path module = importlib.import_module('azure.functions')
File'/usr/local/lib/python3.9/importlib/__init__.py', line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)
File'<frozen importlib._bootstrap>', line 1030, in _gcd_import
File'<frozen importlib._bootstrap>', line 1007, in _find_and_load
File'<frozen importlib._bootstrap>', line 986, in _find_and_load_unlocked
File'<frozen importlib._bootstrap>', line 680, in _load_unlocked
File'<frozen importlib._bootstrap_external>', line 850, in exec_module
File'<frozen importlib._bootstrap>', line 228, in _call_with_frames_removed
File'/home/site/wwwroot/.python_packages/lib/site-packages/azure/functions/__init__.py', line 20, in <module> from ._sql import SqlRow, SqlRowList
File'/home/site/wwwroot/.python_packages/lib/site-packages/azure/functions/_sql.py', line 10, in <module> class SqlRow(_abc.SqlRow, collections.UserDict):
Issue Analytics
- State:
- Created a year ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
module 'azure.functions._abc' has no attribute 'SqlRow' Stack ...
One of our functions used to work fine for the last weeks and still works properly locally but on azure we get the...
Read more >module 'azure.functions' has no attribute 'SqlRowList' - Stack ...
Exception while executing function: Functions.GetUserConfig Result: Failure Exception: AttributeError: module 'azure.functions' has no attribute ...
Read more >Troubleshoot Python errors in Azure Functions - Microsoft Learn
"Exception: ModuleNotFoundError: No module named 'module_name'." This error occurs when a Python function app fails to load a Python module. The ...
Read more >azure-functions - PyPI
What are the supported Python versions? Azure Functions Runtime, Python 3.6, Python 3.7, Python 3.8, Python 3.9. Azure Functions 2.0, ✔, ✠...
Read more >azure-functions-core-tools - npm
Start using azure-functions-core-tools in your project by running `npm i azure-functions-core-tools`. ... To download and install with MSI:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@lamym, no typo. We initially downgraded to
azure-functions==1.11.0as suggested by @CoAct-Atif as a workaround to our function suddenly beginning to fail out of the blue. See thread further up for details.After implementing @MagnusWagner-WIT’s suggestion to set
PYTHON_ISOLATE_WORKER_DEPENDENCIESto1in the Azure AppSettings, we were able to roll back the previous workaround.(Reason=‘Timer fired at 2022-11-08T00:01:39.5694520+00:00’, Id=dcf90174-94e4-45b7-9e40-2a4599a7261e)
Is this enough information for you?
Thanks!