azure-functions-core-tools: Local Debug for Azure Functions failing due to missing libraries
Good morning - we have a Azure Function App in development running a series of Python based functions.
Python - 3.7.7 azure-functions-core-tools@3.0.2534
Until yesterday, this was running fine both in local debug (Attach to Python Functions) and when deployed to the function app in Azure.
As of yesterday (20200609) it started hitting a series of missing imports within the azure-functions-core-tools module - azure-functions-core-tools\bin\workers\python\3.7\windows\x64\grpc_init.py_
- import grpc_tools
- import grpc_health
- import grpc_reflection
I added the following to requirements.txt
** grpcio==1.29.0 grpcio-tools==1.29.0 grpcio-health-checking==1.29.0**
Which allowed the execution to progress, but now it’s hitting an issue with “google.protobuf” in azure-functions-core-tools\bin\workers\python\3.7\windows\x64\google\protobuf\internal\api_implementation.py
from google.protobuf import enable_deterministic_proto_serialization
Exception has occurred: ImportError cannot import name ‘enable_deterministic_proto_serialization’ from ‘google.protobuf’ (xxx\venv\lib\site-packages\google\protobuf_init_.py)
I’m really confused as this has been running locally just fine for weeks.
I’ve tried re-installing the azure-functions-core-tools, but that hasn’t helped. I don’t think adding more library imports to my venv is the right solution, it seems there is some bug in the azure-functions-core-tools package…
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 22 (7 by maintainers)
Hi @JADawson, thanks for reporting the issue, this is caused by the vscode-python extension 2020.5.86398.
Thanks @Rutikhal for providing the following recovery steps. To mitigate this issue, please consider:
We’re still actively investigating this issue and finding the root cause.
It looks like I am not the only one facing this particular issue with the modules. From yesterday, the local debug doesn’t work as usual with the same error.
great @Hazhzeng ! Your solution saved my life here! Thanks!
Thanks for reporting - looks like there is a regression when debugging - we will be investigating this the first thing and will update this thread on our findings, workarounds and fixes.
Just for the sake of empathy. I’m on the verge of going crazy as well! Having the exact same problem