• 1
  • 98
  • 99
  • 100(current)
  • 101
  • 102
  • 176
Release Kanzi: Amazon Alexa skill for Kodi
Use the README on Github instead of 3rd party guides.

Sent from my D5803
Reply
Hi Jingai - thanks for the very quick response, and suggestion.

I just deleted all Roles, Functions and Rules from AWS, and also deleted the Skill from Amazon Developer site. I then followed the instructions in the the Readme on Github. However, I ended up with the same result: "There was an error calling the remote endpoint, which returned HTTP 500 : Internal Server Error".

Does that error mean it cannot connect to my kodi, or that it can't connect with the AWS server? Any ideas on how I can track this issue down?

Thanks again for any assistance!
Reply
First check the skill logs with:

Code:
zappa tail dev

If there's nothing there after sending a request, then it's not getting to the skill. Otherwise, it's probably reporting an error in that log.
Reply
Thanks for the suggestion Jingai. I checked the log after sending a command, and towards the end it indicates the following:

"[1497494068325] [DEBUG] 2017-06-15T02:34:28.325Z 277...9803 Zappa Event: {u'body': u'eyJ2ZXJza.....xsLiJ9fX0=', u'resource': u'/', u'requestContext': {u'resourceId': u'p1j76h04gh', u'apiId': u'juwbfjavr4', u'resourcePath': u'/', u'httpMethod': u'POST', u'requestId': u'27694...65ad0d', u'path': u'/dev', u'accountId': u'781...33', u'identity': {u'apiKey': u'', u'userArn': None, u'cognitoAuthenticationType': None, u'accessKey': None, u'caller': None, u'userAgent': u'Apache-HttpClient/4.5.x (Java/1.8.0_112)', u'user': None, u'cognitoIdentityPoolId': None, u'cognitoIdentityId': None, u'cognitoAuthenticationProvider': None, u'sourceIp': u'72.1.1.164', u'accountId': None}, u'stage': u'dev'}, u'queryStringParameters': None, u'httpMethod': u'POST', u'pathParameters': None, u'headers': {u'Content-Type': u'application/json; charset=utf-8', u'Via': u'1.1 fd885...42052.cloudfront.net (CloudFront)', u'CloudFront-Is-Desktop-Viewer': u'true', u'CloudFront-Is-SmartTV-Viewer': u'false', u'SignatureCertChainUrl': u'https://s3.amazonaws.com/echo.api/echo-api-cert-4.pem', u'CloudFront-Is-Mobile-Viewer': u'false', u'X-Forwarded-For': u'72.1.1.164, 54.1.1.16', u'CloudFront-Viewer-Country': u'US', u'X-Forwarded-Port': u'443', u'Accept': u'application/json', u'User-Agent': u'Apache-HttpClient/4.5.x (Java/1.8.0_112)', u'X-Amzn-Trace-Id': u'Root=1-5941f...2e92', u'Accept-Charset': u'utf-8', u'Host': u'j...4.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'KL4vK...CWNbw5HNMg==', u'CloudFront-Is-Tablet-Viewer': u'false', u'Signature': u'dtm1hQS...W2gGJAjng==', u'CloudFront-Forwarded-Proto': u'https'}, u'stageVariables': None, u'path': u'/', u'isBase64Encoded': True}

[1497494068325] 'NoneType' object is not callable"


(Note: I truncated some of the longer strings, and ID fields with "..."

Any ideas on where to go from here? I would greatly appreciate any ideas!

(Sorry for all the questions, I am new to this, and trying to understand it better...)
Reply
@jaysmith2, I'm sorry I can't give you more details, but I don't use AWS myself so I can only guess.

It looks like you missed something in the AWS Lambda section. The skill itself doesn't seem to be getting called.
Reply
Hi Jingai - thanks for your continued support and suggestions. I went back and deleted all Roles, Rules and Functions from AWS Lambda. I also deleted the User that was originally set up in AWS. I then recreated everything from scratch following the instructions listed. However, I am getting the same results. I am thinking that this may be something simple that I am overlooking, as I am fairly new to this.

Any other suggestions on how to proceed? (Can I point my skill temporarily at another user's host just to rule that out?)

Anyone else familiar with AWS that may be able and willing to help? I would greatly appreciate any assistance, and I would be willing to pay for someone's time to help resolve this issue!

Thanks
Reply
@jaysmith2,

Can you please post a bigger section of the zappa log?
Reply
Hi m0ngr31,

I have listed a more recent snippet from the log. The top portion shows the error, followed by a couple callbacks:

[1497541524288] [DEBUG] 2017-06-15T15:45:24.288Z a56720b0-51e1-11e7-beff-332c3627eec0 Zappa Event: {u'body': u'eyJ2ZXJzaW9u...i1VUyJ9fQ==', u'resource': u'/', u'requestContext': {u'resourceId': u'xlozj3a1x5', u'apiId': u'spcog8xma3', u'resourcePath': u'/', u'httpMethod': u'POST', u'requestId': u'a55f09fb-51e1-11e7-b58f-59893768f000', u'path': u'/dev', u'accountId': u'781845700447', u'identity': {u'apiKey': u'', u'userArn': None, u'cognitoAuthenticationType': None, u'accessKey': None, u'caller': None, u'userAgent': u'Apache-HttpClient/UNAVAILABLE (Java/1.8.0_131)', u'user': None, u'cognitoIdentityPoolId': None, u'cognitoIdentityId': None, u'cognitoAuthenticationProvider': None, u'sourceIp': u'72.1.1.130', u'accountId': None}, u'stage': u'dev'}, u'queryStringParameters': None, u'httpMethod': u'POST', u'pathParameters': None, u'headers': {u'Content-Type': u'application/json; charset=utf-8', u'Via': u'1.1 369b7b53ff47d9af0628945b11e4d56e.cloudfront.net (CloudFront)', u'CloudFront-Is-Desktop-Viewer': u'true', u'CloudFront-Is-SmartTV-Viewer': u'false', u'SignatureCertChainUrl': u'https://s3.amazonaws.com/echo.api/echo-api-cert-4.pem', u'CloudFront-Is-Mobile-Viewer': u'false', u'X-Forwarded-For': u'72.1.1.130, 54.1.1.11', u'CloudFront-Viewer-Country': u'US', u'X-Forwarded-Port': u'443', u'Accept': u'application/json', u'User-Agent': u'Apache-HttpClient/UNAVAILABLE (Java/1.8.0_131)', u'X-Amzn-Trace-Id': u'Root=1-5942ab94-566045202736a21274209cdc', u'Accept-Charset': u'utf-8', u'Host': u'spcog8xma3.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u't7sQPy4kOsW6lRvdovffY2Evj1SJljTwgzELvJYsVRHKEGsAE_TVuQ==', u'CloudFront-Is-Tablet-Viewer': u'false', u'Signature': u'dUaJAlv0Hp...0uB7Rj+HFJJMCQ==', u'CloudFront-Forwarded-Proto': u'https'}, u'stageVariables': None, u'path': u'/', u'isBase64Encoded': True}

[1497541524288] 'NoneType' object is not callable

[1497541744165] [DEBUG] 2017-06-15T15:49:04.165Z 286adcf6-51e2-11e7-9410-5d3ee8f02380 Zappa Event: {u'account': u'781845700447', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2017-06-15T15:48:40Z', u'id': u'8386659f-147b-46a6-a6b4-f76261d5b54c', u'resources': [u'arn:aws:events:us-east-1:781845700447:rule/kodi-alexa-v2-6-dev-zappa-keep-warm-handler.keep_warm_callback']}

[1497541744171] [DEBUG] 2017-06-15T15:49:04.165Z 286adcf6-51e2-11e7-9410-5d3ee8f02380 Zappa Event: {}

[1497541988471] [DEBUG] 2017-06-15T15:53:08.458Z ba09267c-51e2-11e7-ae05-8b300899f32f Zappa Event: {u'account': u'781845700447', u'region': u'us-east-1', u'detail': {}, u'detail-type': u'Scheduled Event', u'source': u'aws.events', u'version': u'0', u'time': u'2017-06-15T15:52:40Z', u'id': u'571d1071-b961-44a0-bb31-41fde34df8ec', u'resources': [u'arn:aws:events:us-east-1:781845700447:rule/kodi-alexa-v2-6-dev-zappa-keep-warm-handler.keep_warm_callback']}

[1497541988471] [DEBUG] 2017-06-15T15:53:08.458Z ba09267c-51e2-11e7-ae05-8b300899f32f Zappa Event: {}

(Note: I truncated some of the longer strings and IP address with "...")

Thanks for your offer to help. It is greatly appreciated!

Larry
Reply
Is there anything before the main error?
Reply
Only more callbacks.
Reply
Are you doing everything in a virtual environment and doing a `pip install -r requirements.txt` before deploying with Zappa?
Reply
@jaysmith2

The "keep_warm_callback" is what zappa does repeatedly to stop the lambda from shutting down, you can ignore those

the first big chunk is also pretty generic

Tail your log (zappa tail dev) in a terminal window and open the service simulator in browser making sure you can still see the terminal, in "enter utterance" put "open kodi" (or whatever invocation name you picked) and click the "ask" button.

You should see the request come through and the text "Welcome to Kodi." If nothing comes through the log then the skill is not linked to aws correctly.

m0ngr31 has already asked but are you using virtualenv?

Also what platform are you using to set this up (linux/mac/win)?

When you "deleted all Roles, Functions and Rules from AWS" manually you may have not removed the other bits that zappa sets up. But before you do anything else please answer the virtual environment question. Ta
Reply
m0ngr31 and digiltd - I am doing everything in a virtual machine and starting from scratch each time with e fresh install. The VM that I am using to create the install is a VMWare Windows 10 environment.

The log that I posted above was the result of the Service Simulator request (not sure if that was "Open Kodi" or "Ask Kodi to Stop").

How can I get rid of the other pieces in AWS that Zappa set up to do a full, clean install?

Thanks for your help - much appreciated.
Reply
The virtual environment we are referring to is virtualenv, it's a Python tool that allows you to set up a contained version of python in a single folder. A virtual machine is different, you don't need to use a virtual machine.

It is covered in the readme (search the readme for virtualenv) and is a requirement of zappa.

Ok, so to "undeploy" a zappa app you use the command "zappa undeploy dev". But if you have reinstalled several times and been removing the IAM credentials, then that might not work. But try "zappa undeploy dev" first. If it doesn't find anything (bear in mind it is hard to know what to tell you without knowing what you have done) then you can manually go through AWS and check the following:

on any aws page click the services drop top (top left) and type "api" then click on "api gateway"

if there are any APIs, click on the API name, then Actions > Delete API

if you just see the "getting started" page then you don't have any APIs setup

next thing is click the service dropdown again and type "cloudwatch" then on the left goto Events > Rules and delete any "keep warm" rules

that should be it, you have already checked your lambda functions so you know how to do that

though next time, if you want to delete the app, use "zappa undeploy" Smile

also, if you get stuck again, it is best to just stop and ask for help rather than guessing Smile
Reply
Hi digiltd,

I did see the API's in AWS, so I went ahead and deleted those, as well as all Roles, Rules and Functions, and started over with a fresh install.

However, it still gives me the error "There was an error calling the remote endpoint, which returned HTTP 500 : Internal Server Error" when I try a test in the Service Simulator.

I'll upload the log shortly...
Reply
  • 1
  • 98
  • 99
  • 100(current)
  • 101
  • 102
  • 176

Logout Mark Read Team Forum Stats Members Help
Kanzi: Amazon Alexa skill for Kodi15