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
Version
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"
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
orfunc 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