question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event Grid output binding does not work on Python

See original GitHub issue

In 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.)

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 to eventGridTrigger) - I have no idea how this works though, and if it’s sufficient to simply put a PR adding that one line to the extensions.json or if something more needs to be done to wire it up.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vrdmrcommented, May 4, 2020

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.

1reaction
johndownscommented, May 4, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found