I'm encountering a weird warning with azure functions locally.
Whenever I func start
my function, I get these error messages:
Found Python version 3.10.12 (python3).
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554
[2023-11-14T10:02:39.795Z] Customer packages not in sys path. This should never happen!
[2023-11-14T10:02:42.194Z] Worker process started and initialized.
In the host.json, extensionBundle version is [3.*, 4.0.0)
In the local.settings.json, "FUNCTIONS_WORKER_RUNTIME": "python"
The function app is based on the new model of python azure function (func init MyProjFolder --worker-runtime python --model V2 https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=linux%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-python)
My first interrogation is the first warning:
Customer packages not in sys path. This should never happen!
. I'm using a virtual environment.
The function is starting correctly, but what is this warning?
local.settings.json:
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing"
}
}
This seems to be the issue with the latest version of Azure function Core tools (4.0.5455), which is published recently (6 days ago) as mentioned in the official doc.
I have created a python Azure function to check the same:
Python Version: 3.11.5
Azure Functions Core Tools
Core Tools Version: 4.0.5348 Commit hash: N/A (64-bit)
Function Runtime Version: 4.24.5.21262
Updated the Azure function Core tools version to 4.0.5455
.
Running the same Azure Function again with below versions:
Python version 3.11.6 (py).
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554