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
- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
I had the same issue. Upgraded Azure Function Core Tools to version 4.0.5530 (having Function Runtime Version 4.28.5.21962); and removed the Windows Store version of Python I had installed to one managed by pyenv (3.10). Now I no longer get a failure when starting the app locally with func host start.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
[2024-02-10T16:12:42.877Z] Customer packages not in sys path. This should never happen!
[...]
Worker failed to index functions
[2024-02-10T16:12:43.200Z] Result: Failure
Exception: ModuleNotFoundError: No module named 'fastapi'. Troubleshooting Guide: https://aka.ms/functions-modulenotfound
Stack: File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 345, in handle__functions_metadata_request
fx_metadata_results = self.index_functions(function_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 617, in index_functions
indexed_functions = loader.index_function_app(function_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\utils\wrappers.py", line 48, in call
raise extend_exception_message(e, message)
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\utils\wrappers.py", line 44, in call
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\loader.py", line 214, in index_function_app
imported_module = importlib.import_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\importlib_init.py", line 126, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jonny\dev\magpi\fastapi-on-azure-functions\function_app.py", line 3, in
from WrapperFunction import app as fastapi_app
File "C:\Users\jonny\dev\magpi\fastapi-on-azure-functions\WrapperFunction_init.py", line 3, in
import fastapi
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful
Same issue when I try on my own repo (with similar architecture).
The text was updated successfully, but these errors were encountered: