Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.32k stars 433 forks source link

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

Open CoolSpot opened 2 months ago

CoolSpot commented 2 months ago

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 #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 commented 1 month ago

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

$ func --version
4.0.6280
oanabotezat commented 2 weeks ago

same issue.

func --version
4.0.6280