Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create "EventGrid trigger" template forPython: Sequence contains no matching element #3818

Open
CoolSpot opened this issue Sep 7, 2024 · 1 comment

Comments

@CoolSpot
Copy link

CoolSpot commented Sep 7, 2024

Version

$ func --version
4.0.5907

Description

  1. First issue is that "func templates -l python list" gives invalid names for some templates, for example "Azue Event Grid trigger" can't be used as a template name for "func new" (see Command func templates list returns invalid templates #2955)

  2. Even when using correct name "EventGrid trigger" it gives error "Sequence contains no matching element"

$ func new --verbose --name SomeAction --template "EventGrid trigger"
Sequence contains no matching element

$ func new --verbose --name SomeAction
Select a number for template:
1. Blob trigger
2. CosmosDB trigger
3. Dapr Publish Output Binding
4. Dapr Service Invocation Trigger
5. Dapr Topic Trigger
6. EventGrid trigger
7. EventHub trigger
8. HTTP trigger
9. Queue trigger
10. ServiceBus Queue trigger
11. ServiceBus Topic trigger
12. Timer Trigger
Choose option: 6
Sequence contains no matching element

Steps to reproduce

  1. create fresh python function app project
    func init --python

  2. try to create from an EventGrid trigger template:
    func new --verbose --name SomeAction
    or
    func new --verbose --name SomeAction --template "EventGrid trigger"

  3. Observe error "Sequence contains no matching element"

  4. renaming existing file function_app.py to _function_app.py makes it work - it will create a directory SomeAction with files init.py and function.json

@ashkan-inpex
Copy link

Any updates on this issue. I have the exact same problem

$ func --version
4.0.6280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants