Func version: 4.0.5390
Python version: 3.10.11
Extension bundle: v4
Repros with both programming model V1 & V2
Repro steps
Create a Python Functions project
Create a blob trigger function (use default template), listening to blobs on the samples-workitems container in the local emulator
Execute your function using F5 on VSCode or running func start
Trigger your function by uploading any blob to the samples-workitems container in the emulator
Check output log
Expected behavior
Show the correct blob size in the output log:
Actual behavior
The blob size is "None bytes" in the output log:
Known workarounds
The default template for blob triggers logs the size of the blob using myblob.length. I tried manually debugging the function, and saw that in my one example, using instead myblob.blob_properties['ContentLength'] to log the blob length worked. I'm not sure if that's always set or a reliable property though. Also not sure if this is a Python worker issue that it doesn't properly set the myblob.length property, or a templates issue that it shouldn't rely on the myblob.length property to begin with.
Investigative information
Func version: 4.0.5390 Python version: 3.10.11 Extension bundle: v4 Repros with both programming model V1 & V2
Repro steps
samples-workitems
container in the local emulatorfunc start
samples-workitems
container in the emulatorExpected behavior
Show the correct blob size in the output log:![image](https://github.com/Azure/azure-functions-python-worker/assets/31644556/0f95902f-cc75-433c-a4e8-2c11c8af9ad1)
Actual behavior
The blob size is "None bytes" in the output log:
Known workarounds
The default template for blob triggers logs the size of the blob using
myblob.length
. I tried manually debugging the function, and saw that in my one example, using insteadmyblob.blob_properties['ContentLength']
to log the blob length worked. I'm not sure if that's always set or a reliable property though. Also not sure if this is a Python worker issue that it doesn't properly set themyblob.length
property, or a templates issue that it shouldn't rely on themyblob.length
property to begin with.Contents of the requirements.txt file:
Related information
From https://github.com/microsoft/vscode-azurefunctions/issues/4051