You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you run the app, you will see an exception Exception: AttributeError: 'NoneType' object has no attribute 'type'. This exception occurs at this line in Python language worker.
This azure function app is supposed to be triggered by Dapr cron trigger every 10 second and it should log the message. However, Python language worker expects trigger data in all kinds of trigger. But Dapr cron binding doesn't send any data as part of trigger request, reason being it's a timer trigger.
Expected behavior
Provide a description of the expected behavior.
Python language worker should not expect trigger data in all triggers. In case of Dapr Cron binding trigger, it will not receive any request body, and it is by design from Dapr. Azure function app should get trigger based on the cron expression defined in Dapr cron binding component.
Actual behavior
Provide a description of the actual behavior observed.
Python language worker always expects a request body with trigger, that is not the case with Dapr Cron binding trigger. Dapr Cron binding trigger will simply call the app without any request body, so the data will be nil in this case.
Known workarounds
Provide a description of any known workarounds.
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
# __init__.pyimportdatetimeimportloggingimportazure.functionsasfuncdefmain(triggerData) ->None:
logging.info(f"Invoked by Dapr cron binding trigger: Hello, World! The time is {datetime.datetime.now()}")
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
Create an azure function using Python Language and follow the steps mentioned in Readme.
Once you run the app, you will see an exception
Exception: AttributeError: 'NoneType' object has no attribute 'type'
. This exception occurs at this line in Python language worker.This azure function app is supposed to be triggered by Dapr cron trigger every 10 second and it should log the message. However, Python language worker expects trigger data in all kinds of trigger. But Dapr cron binding doesn't send any data as part of trigger request, reason being it's a timer trigger.
Expected behavior
Provide a description of the expected behavior.
Python language worker should not expect trigger data in all triggers. In case of Dapr Cron binding trigger, it will not receive any request body, and it is by design from Dapr. Azure function app should get trigger based on the cron expression defined in Dapr cron binding component.
Actual behavior
Provide a description of the actual behavior observed.
Python language worker always expects a request body with trigger, that is not the case with Dapr Cron binding trigger. Dapr Cron binding trigger will simply call the app without any request body, so the data will be nil in this case.
Known workarounds
Provide a description of any known workarounds.
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
Related information
Provide any related information
# requirements.txt azure-functions
The text was updated successfully, but these errors were encountered: