0

使用 ASK CLI,我正在尝试更新我的智能家居技能清单,但我面临以下错误。

问 smapi get-skill-manifest -s amzn1.ask.skill.6d0d22eb-d305-4caa-8921-503cb7827454 -p supreet > Skill-manifest.json

我刚刚更改了下载清单中的拼写。

问 smapi update-skill-manifest -s --manifest $(cat Skill-manifest.json)

或者

问 smapi update-skill-manifest -s --manifest Skill-manifest.json

"response": {
      "message": "Request is not valid.",
      "violations": [
        {
          "code": "INVALID_REQUEST_PARAMETER",
          "message": "Parsing error due to invalid body.",
          "validationDetails": {
            "originalInstance": {
              "type": "BODY"
            },
            "reason": {
              "type": "MALFORMED_INPUT"
            }
          }
        }
      ]
    }

这是技能清单.json

{
  "manifest": {
    "apis": {
      "smartHome": {
        "endpoint": {
          "uri": "<arn>"
        },
        "protocolVersion": "3"
      }
    },
    "manifestVersion": "1.0",
    "permissions": [
      {
        "name": "alexa::async_event:write"
      }
    ],
    "privacyAndCompliance": {
      "allowsPurchases": false,
      "containsAds": false,
      "isChildDirected": false,
      "isExportCompliant": true,
      "locales": {
        "en-IN": {
          "privacyPolicyUrl": "https://www.privacyyyyyyypolicy.net",
          "termsOfUseUrl": "https://www.termsofuse.net"
        }
      },
      "usesPersonalInfo": false
    },
    "publishingInformation": {
      "automaticDistribution": {
        "isActive": false
      },
      "category": "SMART_HOME",
      "distributionCountries": [],
      "distributionMode": "PUBLIC",
      "isAvailableWorldwide": true,
      "locales": {
        "en-IN": {
          "description": "Test",
          "examplePhrases": [
            "test"
          ],
          "keywords": [
            "test"
          ],
          "largeIconUri": "<logo-url>",
          "name": "Test",
          "smallIconUri": "<logo2-url>",
          "summary": "Test"
        }
      },
      "testingInstructions": "test using alexa"
    }
  }
}
4

2 回答 2

0

I ran into the same issue few months ago while uploading a manifest. The issue was that the json file had to be preceded by the prefix "file:" like:

--manifest "file:manifestFile.json"

And so your command would be:

ask smapi update-skill-manifest -s --manifest "file:skill-manifest.json"

Here are more details about this.

于 2021-09-10T13:39:37.393 回答
0

检查 Skill-manifest.json 文件的编码!

在我的情况下使用它设置的 ask cli 下载文件UTF-16 LE时,由于某种原因在更新时不接受该文件。将编码更改为UTF-8或者ISO 8859-1它工作后。

于 2021-12-09T13:49:10.087 回答