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
I'm working on a FAST- API application with an HTTP trigger on Azure Functions, when I try to deploy I get the error No HTTP Triggers, But it works when I test locally in the terminal
Kindly help me, how can I resolve this, I have given below details of the steps I took. Thanks a Million in advance for some of your valuable suggestions.
Best,
Roopesh
This issue is for a: (Azure Functions HTTP Trigger on the Fast API Wrapper )
i have used the code :
import azure.functions as func
from WrapperFunction import app as fastapi_app
app = func.AsgiFunctionApp(app=fastapi_app, http_auth_level=func.AuthLevel.ANONYMOUS)
Also, I have written the wrapper function init.py
When I run the 'func host start' in the terminal, I get the following links, with this I used Postman to check the working, and I found this works very well.
(Python3_9) (base) roopeshbharatwajkr@Roopeshs-MacBook-Pro backend_dli_final % func host start
Found Python version 3.9.18 (python3).
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554
[2024-10-21T08:23:17.773Z] Customer packages not in sys path. This should never happen!
[2024-10-21T08:23:21.531Z] Worker process started and initialized.
Functions:
http_app_func: [GET,POST,DELETE,HEAD,PATCH,PUT,OPTIONS] http://localhost:7071//{*route}
For detailed output, run func with --verbose flag.
When i checked the Diagnose and Solve Problem within the Azure function,
I checked the specific issue regarding :-> 'Functions not triggering'.
I found that,
Exception: Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException:
Message : Worker failed to index functions
Result: Failure Exception: ModuleNotFoundError: No module named 'uvicorn'. Cannot find module. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound. Current sys.path: ['/home/site/wwwroot', '/home/site/wwwroot/.python_packages/lib/site-packages', '/azure-functions-host/workers/python/3.10/LINUX/X64', '/usr/local/lib/python310.zip', '/usr/local/lib/python3.10', '/usr/local/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/site-packages'] Stack: File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py', line 469, in _handle__functions_metadata_request self.load_function_metadata( File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py', line 449, in load_function_metadata self.index_functions(function_path, function_app_directory)) \ File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py', line 822, in index_functions indexed_functions = loader.index_function_app(function_path) File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/utils/wrappers.py', line 49, in call raise extend_exception_message(e, message) File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/utils/wrappers.py', line 44, in call return func(*args, **kwargs) File '/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/loader.py', line 244, in index_function_app imported_module = importlib.import_module(module_name) File '/usr/local/lib/python3.10/importlib/init.py', line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File '/home/site/wwwroot/function_app.py', line 3, in from backend_dli import app as fastapi_app File '/home/site/wwwroot/backend_dli/init.py', line 3, in import uvicorn
Exception : ERROR: Error: No module named 'uvicorn', Cannot find module. Pl
Message : ERROR: Error: No module named 'uvicorn', Cannot find module. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound. Current sys.path: ['/home/site/wwwroot', '/home/site/wwwroot/.python_packages/lib/site-packages', '/azure-functions-host/workers/python/3.10/LINUX/X64', '/usr/local/lib/python310.zip', '/usr/local/lib/python3.10', '/usr/local/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/site-packages']
I found that there is no Module named Uvicorn, actually i don't use the same for the Fast API so , i have removed it but still i get this error. even after removing the import statement and removing in the Req.txt file.
The text was updated successfully, but these errors were encountered:
Hi Everyone,
I'm working on a FAST- API application with an HTTP trigger on Azure Functions, when I try to deploy I get the error No HTTP Triggers, But it works when I test locally in the terminal
I followed the: https://learn.microsoft.com/en-us/samples/azure-samples/fastapi-on-azure-functions/fastapi-on-azure-functions/
Kindly help me, how can I resolve this, I have given below details of the steps I took. Thanks a Million in advance for some of your valuable suggestions.
Best,
Roopesh
This issue is for a: (Azure Functions HTTP Trigger on the Fast API Wrapper )
i have used the code :
Also, I have written the wrapper function init.py
When I run the 'func host start' in the terminal, I get the following links, with this I used Postman to check the working, and I found this works very well.
Host.json file
When I Deploy the function app, I get the following in the Output tab of Vs-code
When i checked the Diagnose and Solve Problem within the Azure function,
I found that there is no Module named Uvicorn, actually i don't use the same for the Fast API so , i have removed it but still i get this error. even after removing the import statement and removing in the Req.txt file.
The text was updated successfully, but these errors were encountered: