azure-functions-core-tools@4 How to use func new with parameters on a MacBook?

Anonymous
2024-05-15T10:47:41+00:00

On my MacBook I have set up a Python project using func init.

I want to use func new to create functions based on a template.

I got a list of templates using

func templates list --language python

func new \                                                                                                                    ─╯

  --language python \

  --template "Azure Blob Storage trigger" \

  --name "delete_blob"

This produces an error "Object not set to an instance of an object".

I've tried

CLI_DEBUG=1 func new --template "Azure Blob Storage trigger" --name "delete_blob"

System.NullReferenceException: Object reference not set to an instance of an object.

   at Azure.Functions.Cli.Actions.LocalActions.CreateFunctionAction.RunAsync() in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\LocalActions\CreateFunctionAction.cs:line 181

   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\_work\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 64

If I use func new without any arguments then I can just follow the prompts but I want to use the CLI arguments

Windows for business Windows Server Windows cloud Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-15T10:52:45+00:00

    Hello Dave Poole1,

    Thank you for posting in Microsoft Community forum.

    From the description above, I understand your question is related to Azure Function.

    Since there are no engineers dedicated to Azure Function in this forum. in order to be able to get a quick and effective handling of your issue, I recommend that you repost your question in the Q&A forum, where there will be a dedicated engineer to give you a professional and effective reply.

    Here is the link for Q&A forum.
    Questions - Microsoft Q&A

    Click the "Ask a Question" button in the upper right corner to post your question and type "Azure Function" tag and select any tags related to your productions.

    I hope the information above is helpful.

    If you have any question or concern, please feel free to let us know.

    Best Regards,
    Daisy Zhou

    0 comments No comments