Skip to content

func new failing #4622

@ericthomas1

Description

@ericthomas1

Version

4.2.1

Description

I've been using func tools in VS Code for like 5-6yrs, largely without issue.

  1. func init, select Python
  2. func new, then I get this error:
PS C:\Users\<me>\fa-test> func new
Templates JSON is empty. Please check the templates location.

TRIED:

  1. Uninstall / reinstall version 4.2.1
  2. Adding C:\Program Files\Microsoft\Azure Functions Core Tools\func.exe to Path variable.
  3. Looking into the C:\Program Files\Microsoft\Azure Functions Core Tools\templates dir to see if the QueueTrigger-Python template was indeed there...it is!
...
{
    "id": "QueueTrigger-Python",
    "runtime": "3",
    "files": {
      "readme.md": "# QueueTrigger - Python\r\n\r\nThe `QueueTrigger` makes it incredibly easy to react to new Queues inside of Azure Queue Storage. This sample demonstrates a simple use case of processing data from a given Queue.\r\n\r\n## How it works\r\n\r\nFor a `QueueTrigger` to work, you provide a path which dictates where the queue messages are located inside your container.\r\n\r\n## Learn more\r\n\r\n<TODO> Documentation\r\n",
      "sample.dat": "sample queue data",
      "__init__.py": "import logging\r\n\r\nimport azure.functions as func\r\n\r\n\r\ndef main(msg: func.QueueMessage) -> None:\r\n    logging.info('Python queue trigger function processed a queue item: %s',\r\n                 msg.get_body().decode('utf-8'))\r\n"
    },
    "function": {
      "scriptFile": "__init__.py",
      "bindings": [
        {
          "name": "msg",
          "type": "queueTrigger",
          "direction": "in",
          "queueName": "python-queue-items",
          "connection": ""
        }
      ]
    },
    "metadata": {
      "defaultFunctionName": "QueueTrigger",
      "description": "$QueueTrigger_description",
      "name": "Azure Queue Storage trigger",
      "language": "Python",
      "category": [
        "$temp_category_core",
        "$temp_category_dataProcessing"
      ],
      "categoryStyle": "queue",
      "enabledInTryMode": true,
      "userPrompt": [
        "connection",
        "queueName"
      ],
      "filters": [
        "Python3"
      ],
      "extensions": [
        {
          "id": "Microsoft.Azure.WebJobs.Extensions.Storage",
          "version": "3.0.10"
        }
      ]
    }
  },
...

Ideas?

Hm...#4545

Steps to reproduce

See above.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions