Event Grid output binding does not work on Python
See original GitHub issueIn the process of updating the documentation for the Event Grid output binding (see this PR), I discovered that the output binding does not work correctly with Python functions. It does work correctly for .NET and Node.js. (Note I have opened a separate issue to log that this doesn’t work for Java either.)
- I used this function.json and this function code.
- When I ran the function, I got this error:
Result: Failure
Exception: FunctionLoadError: cannot load the MyFunction function: Python return annotation "EventGridEvent" does not match binding type "eventGrid"
Stack: File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 245, in _handle__function_load_request
function_id, func, func_request.metadata)
File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/functions.py", line 241, in add_function
f'Python return annotation "{return_pytype.__name__}" '
- I wonder if the issue is that the binding extension bundle does not include a reference to the
eventGrid
output binding (only toeventGridTrigger
) - I have no idea how this works though, and if it’s sufficient to simply put a PR adding that one line to theextensions.json
or if something more needs to be done to wire it up.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Azure Event Grid output binding for Azure Functions
Use the Event Grid output binding to write events to a custom topic. You must have a valid access key for the custom...
Read more >Function stops with no errors after add eventGrid as out binding
I have an Azure function with a blobTrigger as input and an Azure Storage Table as output. It is working without any problem....
Read more >Azure Event Grid binding spec - Dapr Docs
Azure Event Grid requires a valid HTTPS endpoint for custom webhooks. Self signed certificates won't do. In order to enable traffic from ...
Read more >Getting Started with Azure Functions Tutorial [Example-Driven ...
Azure Functions is an event-driven, serverless compute platform used to ... You reference the output binding in the code, and the function ......
Read more >Chapter 4. Getting Started with Microsoft Azure Functions
You can optionally add input and output bindings to the configuration of a function, ... add a function to it that is triggered...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @johndowns. I’ve opened a documentation PR: https://github.com/MicrosoftDocs/azure-docs/pull/54037
I’ll close this issue as it is resolved from our side and is now supported in the newly released azure-functions-python-1.2.1 module.
@vrdmr - yes, I believe that’s the page. It’s been moved since I worked on it but it looks like that’s the one to update.