Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.

modelTemplateRename always responds with "unsupported action" #408

@jojo259

Description

@jojo259

Seems to also apply to modelTemplateAdd and modelTemplateRename (potentially others too).

import requests

response = requests.post('http://localhost:8765', json = {
	'action': 'modelTemplateRename',
	'version': 6,
	'params': {
		'modelName': 'Basic',
		'oldTemplateName': 'Card 1',
		'newTemplateName': 'Card 1 renamed'
	}
})

print(response.text)
curl -X POST -H "Content-Type: application/json" -d "{\"action\": \"modelTemplateRename\", \"version\": 6, \"params\": {\"modelName\": \"Basic\", \"oldTemplateName\": \"Card 1\", \"newTemplateName\": \"Card 1 renamed\"}}" http://localhost:8765

Always results in {"result": null, "error": "unsupported action"} no matter which versions, model names, or template names I use and the same applies to the other two actions.

Line of code with that string: https://github.com/FooSoft/anki-connect/blob/master/plugin/__init__.py#L128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions