Closed
Description
Hey,
i am running into issues with python azure function under VSCode. FYI the same example I will present is working fine with JS.
Set up:
Mac M1 Big Sur v11.2.1
python 3.9.1
Core Tools Version: 3.0.3284
I am following the usual workflow: func init, func new, func start. When I start the function, this is what I get:
Found Python version 3.9.1 (python3).
Azure Functions Core Tools
Core Tools Version: 3.0.3284 Commit hash: 98bc25e668274edd175a1647fe5a9bc4ffb6887d
Function Runtime Version: 3.0.15371.0
Ä2021-02-16T20:28:10.779ZÅ Traceback (most recent call last):
Ä2021-02-16T20:28:10.783ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/worker.py", line 84, in <module>
Ä2021-02-16T20:28:10.783ZÅ from azure_functions_worker import main
Ä2021-02-16T20:28:10.783ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/main.py", line 8, in <module>
Ä2021-02-16T20:28:10.783ZÅ from . import dispatcher
Ä2021-02-16T20:28:10.783ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/dispatcher.py", line 21, in <module>
Ä2021-02-16T20:28:10.783ZÅ import grpc
Ä2021-02-16T20:28:10.783ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/__init__.py", line 23, in <module>
Ä2021-02-16T20:28:10.783ZÅ from grpc._cython import cygrpc as _cygrpc
Ä2021-02-16T20:28:10.784ZÅ ImportError: dlopen(/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so, 2): no suitable image found. Did find:
Ä2021-02-16T20:28:10.785ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Ä2021-02-16T20:28:10.788ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Ä2021-02-16T20:28:10.788ZÅ Traceback (most recent call last):
Ä2021-02-16T20:28:10.788ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/worker.py", line 84, in <module>
Ä2021-02-16T20:28:10.788ZÅ from azure_functions_worker import main
Ä2021-02-16T20:28:10.794ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/main.py", line 8, in <module>
Ä2021-02-16T20:28:10.794ZÅ from . import dispatcher
Ä2021-02-16T20:28:10.794ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/dispatcher.py", line 21, in <module>
Ä2021-02-16T20:28:10.794ZÅ import grpc
Ä2021-02-16T20:28:10.794ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/__init__.py", line 23, in <module>
Ä2021-02-16T20:28:10.799ZÅ from grpc._cython import cygrpc as _cygrpc
Ä2021-02-16T20:28:10.799ZÅ **ImportError: dlopen(/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so, 2): no suitable image found. Did find:**
Ä2021-02-16T20:28:10.799ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Ä2021-02-16T20:28:10.799ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Ä2021-02-16T20:28:10.799ZÅ Traceback (most recent call last):
Ä2021-02-16T20:28:10.800ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/worker.py", line 84, in <module>
Ä2021-02-16T20:28:10.800ZÅ from azure_functions_worker import main
Ä2021-02-16T20:28:10.800ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/main.py", line 8, in <module>
Ä2021-02-16T20:28:10.800ZÅ from . import dispatcher
Ä2021-02-16T20:28:10.800ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/azure_functions_worker/dispatcher.py", line 21, in <module>
Ä2021-02-16T20:28:10.800ZÅ import grpc
Ä2021-02-16T20:28:10.800ZÅ File "/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/__init__.py", line 23, in <module>
Ä2021-02-16T20:28:10.800ZÅ from grpc._cython import cygrpc as _cygrpc
Ä2021-02-16T20:28:10.800ZÅ **ImportError: dlopen(/opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so, 2): no suitable image found. Did find:**
Ä2021-02-16T20:28:10.800ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Ä2021-02-16T20:28:10.801ZÅ Exceeded language worker restart retry count for runtime:python. Shutting down and proactively recycling the Functions Host to recover
Ä2021-02-16T20:28:10.808ZÅ /opt/homebrew/Cellar/azure-functions-core-toolsÉ3/3.0.3284/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so: mach-o, but wrong architecture
Functions:
HttpTrigger: ÄGET,POSTÅ http://localhost:7071/api/HttpTrigger
For detailed output, run func with --verbose flag.
I would appreciate some advice here!
Thanks and all the best
Metadata
Metadata
Assignees
Labels
No labels