I am hosting a Static Web App, where I deploy manually with swa cli. I have an api that needs to connect to other resources in the same resource group. For that, I am using the python sdk. It works as expected locally, but when deployed, the function cannot locate the sdk modules.
I cannot find anything in the documentation about these modules not being supported in managed functions. I have filled up my requirements.txt with the modules I need. Am I missing a step?
Exception while executing function: Functions.list_subscriptions Result: Failure
Exception: ModuleNotFoundError: No module named 'azure.mgmt'. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound
Stack: File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 370, in _handle__function_load_request
func = loader.load_function(
File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 48, in call
raise extend_exception_message(e, message)
File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 44, in call
return func(*args, **kwargs)
File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/loader.py", line 132, in load_function
mod = importlib.import_module(fullmodname)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/site/wwwroot/list_subscriptions/__init__.py", line 6, in <module>
from azure.mgmt.apimanagement import ApiManagementClient