Reputation: 61
I try to local debug the azure function, but got issue. Actually I just follow the instruction to build and tested with below link, but not work.
The instruction is here Debug the Azure Functions Python code locally, and I did not modified the code at all.
While I try to run debug, it pop up error.
Executing task: .venv\Scripts\activate ; func host start
Found Python version 3.8.6 (py).
Azure Functions Core Tools Core Tools Version: 3.0.3160 Commit hash: 00aa7f43cc5c5f15241b5e6e5363256f19ceb990 Function Runtime Version: 3.0.14916.0
Value cannot be null. (Parameter 'provider')
Terminal will be reused by tasks, press any key to close it.
I have no idea what's wrong after I search lots of topic in GitHub or stackoverflow. Finally I remove the azure function extensionBundle in the host.json as a workaround.
Did anyone encounter the same issue with me?
Below is my environment: Windows 10 Python 3.8.6 Function Core Tools Version:3.0.3160 python packages azure-functions 1.50
Upvotes: 4
Views: 10821
Reputation: 2910
Try changing your Azure Function Core Tools version.
I was on 4.0.3971, the function started fine.
Upgraded to 4.0.4670 (latest at the time), got the same error as you did.
Reverted to 4.0.3971, worked fine.
Upvotes: 1
Reputation: 97
Another thing why local debugging might not work is low internet connection. I had such a case with same "Value cannot be null. (Parameter 'provider')" error when trying to work from a hotel with bad (low speed and not stable) internet connection.
Upvotes: 2
Reputation: 6816
Maybe you can try to open the Command Palette (F1)
, select the Python: Select Interpreter
command, and then select the virtual environment in the local .venv
folder
Or you can change host.json
, extensionBundle
requires a higher version.
Upvotes: 2