Closed tkumpumak closed 2 weeks ago
For others, who also don't know what Azure durable functions is:
Durable Functions is a feature of Azure Functions that lets you write stateful functions in a serverless compute environment.
Sorry, we need a reproducer to fix this :(
Tested this a bit more. Copied whole mimetypes.py module to the image and it works correctly so no issue in the code, something wrong with the image. Reported again here https://github.com/Azure/azure-functions-docker/issues/1075
Bug report
Bug description:
mimetypes.guess_type returns correctly 'text/plain' when testing on windows or docker linux container. Unfortunately on Azure durable function python code it for some reason returns None.
Following test code, that also contains parts of mimetype.guess_type was run on Windows and on Azure durable function. Result print follows below.
So I'm out of ideas how to debug this more. First of all what would be the right place to report this issue? What code Azure durable function could be running, it seems that it's not copy of the mimetype, but the data inside mimetype seems to be correct.
Windows: Test1: doc_name:file://test.txt mimetype: text/plain Test2: doc_name:file://test.txt mimetype: text/plain Available types: SNIP long list, List contains: '.n3': 'text/n3', '.txt': 'text/plain', '.bat': 'text/plain', ext:.txt ext:.txt Return 1, ext:.txt mimetype: text/plain
Azure durable function: Test1: doc_name:file://test.txt mimetype: None Test2: doc_name:file://test.txt mimetype: None Available types: SNIP long list, List contains: '.n3: text/n3, .txt: text/plain, .bat: application/x-msdos-program', ext:.txt ext:.txt Return 1, ext:.txt mimetype: text/plain
CPython versions tested on:
3.11
Operating systems tested on:
Other