Azure function error: func new --name classify --template "HTTP trigger"

Viewed 310

I'm creating a local Azure functions project on a Windows 64 environment.

  • Python 3.9.6
  • Windows 11
  • VSCode
  • Function core tools 3.0.3904

When adding a function to my project with the command in the terminal:

func new --name classify --template "HTTP trigger"

I get the error:

One or more errors occurred. (A task was canceled.)

This function is supposed to create a directory matching the name of the function, classify. But the code breaks here.

Can anyone help?

Thanks in advance!

1 Answers

One or more errors occurred. (A task was canceled.)

Generally the below are the reasons why you might be receiving a TaskCanceledException:

  1. Something called Cancel() on the CancellationTokenSource associated with the cancellation token before the task completed.
  2. The request might be timed out.

Initially, Our local environment is running with python version 3.9.6 & function core tools version 3.0.3734 on windows 11.

  • As mentioned in the thread, since op is facing function creation failure with function core tools version 3.0.3904.
  • We have updated the version of our local function core tools version from 3.0.3734 to 3.0.3904( which in pre release as mentioned in this GITHUB )
  • Post installation of function core tools v3.0.3904 ,We are able to create the http trigger function.

Here is the output screenshot for reference:

enter image description here

Related