Reputation: 11793
I'm in windowns 10. I was developing my python azure function in vscode and test it in local host. Everything was fine until recently. I tried to start my azure functions, but I got error messages like below:
Exception has occurred: ModuleNotFoundError
No module named 'grpc_tools'
File "c:\users\myusername\appdata\roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\3.7\windows\x64\grpc\__init__.py", line 2034, in <module>
import grpc_tools
File "c:\users\myusername\appdata\roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\3.7\windows\x64\azure_functions_worker\dispatcher.py", line 16, in <module>
import grpc
File "c:\users\myusername\appdata\roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\3.7\windows\x64\azure_functions_worker\main.py", line 7, in <module>
from . import dispatcher
File "c:\users\myusername\appdata\roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\3.7\windows\x64\worker.py", line 59, in <module>
from azure_functions_worker import main
I have not changed anything since last time I tested my azure function. Have no idea why I got the error messsage. Does anyone know what the error message mean? what cold be the solution to the issue?
Something wrong with the azure-functions-core-tools
? The problem is I have not changed anything at all. But now it stopped working for no reason. Really appreciate it if anyone can help. Thanks.
Upvotes: 2
Views: 1822
Reputation: 23
Running func start
from the cli works for me; running from VS Code still produces errors.
Also, trying to manually install the packages works; however, I consider this a workaround. Also you will be going down the rabbit hole, as every time you add a package, some other one will not work.
Upvotes: 2
Reputation: 11
I had the same issue start popping up yesterday after a few months of not working with Azure Functions and on a new laptop.
I found that you can disable the exception alerts in the Visual Studio Code debugger.
By default, Uncaught Exceptions and User Uncaught Exceptions are checked: uncheck them and that will prevent the debugger from showing exceptions.
Upvotes: 1