question

newuser-75e6affd-c7fd-42ad-a660-2a1981e31af7 avatar image

ASK get-skill command fails, complains about missing skill-id param

I have an existing skill and I want to support skill events. I've installed and inited the ASK api, but haven't been able to use it successfully. When I try to run

ask api get-skill --stage development –-skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX -p Matt

the result is

Please input required parameter: skill-id. 

It looks like I'm using the command correctly, what else could cause this?

By the way, if there's a way to add support for skill events that uses the developer console instead of the ASK api, I'm all ears.

ask cli
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Also: when I try

ask validate --skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX -p Matt -l en-CA

that is successful, so it's something about the "api get-skill" command.

0 Likes 0 ·
Rokas avatar image
Rokas answered

The sequence of options matter. --skil-id has to go before --stage-development. The correct command is:

ask api get-skill –-skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX --stage development -p Matt

Talking about events integration in console. If you have suggestions or feature requests please post them in alexa uservoice, or upvote ideas you like, so that amazon team knows what is important for the developers.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-75e6affd-c7fd-42ad-a660-2a1981e31af7 avatar image
newuser-75e6affd-c7fd-42ad-a660-2a1981e31af7 answered

Thanks @RokasV - I tried

ask api get-skill –-skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX --stage development -p Matt

But got the same error.

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rokas avatar image Rokas commented ·

Chmm, tried just the same command and everything worked out fine. Are you sure that provided profile has that skill in it?

0 Likes 0 ·

As you can see from my comment above, "ask validate" works just fine with that skill. I actually changed something on the skill to an invalid value (in the dev console) and saw it fail when I ran "ask validate", then changed it back and saw it succeed again. It's definitely finding the right skill.

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hello @NewUser-75e6affd-c7fd-42ad-a660-2a1981e31af7 and thanks for your message.

This is very odd. I have raised an internal ticket to our team to take a look on this. I will keep you posted of any developments.

In the meantime, can you please confirm which version of the ASK CLI you are using?

ask --version

Regards,
Barry

4 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I have 1.4.6. Node is v6.14.4. I've also tried this with node v9.9.0 (I have nvm) with the same result.

0 Likes 0 ·

@barry@amazon any update on that ticket?

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image Amazon_Bernardo Bezerra newuser-75e6affd-c7fd-42ad-a660-2a1981e31af7 commented ·

Hello @NewUser-75e6affd-c7fd-42ad-a660-2a1981e31af7 and thank you for your patience while we researched this issue.

From our analysis, it seems that your input is incorrect. It is possible that there is some sort of auto correct enabled in your machine that is replacing the double dash symbol (--) with something that looks like it.

When I passed the string you posted here through a quick python code, this is the output I got:

>>> str1 = 'ask api get-skill –-skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX --stage development'
>>> for c in str1:
... print(c + ': ' + str(ord(c)))
...
a: 97
s: 115
k: 107
: 32
a: 97
p: 112
i: 105
: 32
g: 103
e: 101
t: 116
-: 45
s: 115
k: 107
i: 105
l: 108
l: 108
: 32
?: 226
?: 128
?: 147
-: 45
s: 115
k: 107
i: 105
l: 108
l: 108
-: 45
i: 105
d: 100 (cont.)...

Now this is the output for a string that I typed, which returned the expected result:

>>> str2 = 'ask api get-skill --skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX --stage development'
>>> for c in str2:
... print(c + ': ' + str(ord(c)))
...
a: 97
s: 115
k: 107
: 32
a: 97
p: 112
i: 105
: 32
g: 103
e: 101
t: 116
-: 45
s: 115
k: 107
i: 105
l: 108
l: 108
: 32
-: 45
-: 45
s: 115
k: 107
i: 105
l: 108
l: 108
-: 45
i: 105
d: 100 (cont.)...

As you can see, for my command, the '-' symbol was identified as 45, while in yours it didn't even print correctly.

Can you please try again, by typing it in the command line instead of copying and pasting from somewhere?

Regards,
Barry

0 Likes 0 ·

Thanks. I think this website must have converted those characters for display, I definitely had double dashes in my input. Oddly, yesterday the command started working and I was able to use it successfully. First thing this morning I started getting the error again, and now it's working again.

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Quick question @NewUser-75e6affd-c7fd-42ad-a660-2a1981e31af7: right after I sent the above message I tried to replicate your issue once again and executed the following command:

ask api get-skill –-skill-id amzn1.ask.skill.XXXXX-XXXXXX-XXXXX

Which gave me the same error message you got. The skill ID argument should be in the following format:

amzn1.ask.skill.12345678-90ab-cdef-1234567890ab

Can you confirm which skill ID you are trying to get the model for?

Regards,
Barry

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I masked the skill's actual ID in my post - do you need me to post the actual ID here? Also: note my comments about "ask validate" above, which worked as expected

0 Likes 0 ·