Ask questionsLocal 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 firstname.lastname@example.org
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_
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....
Answer questions luabud
This doesn't seem to be an issue in the Python extension, this can also be reproduced with other extensions such as CMake Tools and Docker. We're tracking the issue upstream in the VS Code repo here: microsoft/vscode#99699.
FWIW I can still reproduce the same issue when manually installing previous versions of the Python extension, so I'm not sure what is going on.