๐Ÿ“ฃ๐Ÿ“ช ๐Ÿšš Adafruit will not be shipping USPS orders Monday January 20, 2020 ๐Ÿ—“. Expedited USPS orders placed after 11am ET ๐Ÿ•š Friday January 17 will go out Tuesday January 21 ๐Ÿ“ฃ๐Ÿ“ช๐Ÿšš
0

Adabox 11 Problems with PyPortal
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adabox 11 Problems with PyPortal

by alphagenius on Thu Jul 18, 2019 5:17 pm

I am working on the project in Adabox 11 that is locate here: https://learn.adafruit.com/pyportal-you ... rs-display.

I have gotten to the last step and I am stuck. When my PyPortal runs, it displays the YouTube background and the labels but no content. After about a minute, the screen disappears, and I get the errors. I just do not know how to proceed. Here is what is printed on the screen:

Retrieving data...Reply is OK!
{'error': {'code': 400, 'errors': [{'reason': 'key Invalid', 'domain': 'usageLimits', 'message': 'Bad Request'}], 'message': 'Bad Request'}}
Traceback (most recent call last);
File "code.py" line 60, in <module>
File "code.py" line 50, in <module>
File "/lib/adafruit_pyportal.py", line 776, in fetch
File "/lib/adafruit_pyportal.py", line 773, in fetch
File "/lib/adafruit_pyportal.py", line 547, in _json_traverse
KeyError: items

Code done running, waiting for reload.

I hope someone can help me get this going.

alphagenius
 
Posts: 18
Joined: Sat Feb 04, 2017 4:27 pm

Re: Adabox 11 Problems with PyPortal

by adafruit_support_carter on Thu Jul 18, 2019 5:52 pm

Based on the JSON response you got:
Code: Select all | TOGGLE FULL SIZE
{'error': {'code': 400, 'errors': [{'reason': 'key Invalid', 'domain': 'usageLimits', 'message': 'Bad Request'}], 'message': 'Bad Request'}}

it looks like you are having issues accessing the YouTube API. Did you setup the token?
https://learn.adafruit.com/pyportal-you ... -token-5-5


[EDIT] Is this a separate issue?
viewtopic.php?f=59&t=154229

adafruit_support_carter
 
Posts: 13904
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adabox 11 Problems with PyPortal

by alphagenius on Fri Jul 19, 2019 9:22 am

I found the problem. In the "secrets.py" file where I put my token key, somehow I had a space between the first single quote and the start of my key. Don't know how I managed that but anyway. Thanks for your help.

alphagenius
 
Posts: 18
Joined: Sat Feb 04, 2017 4:27 pm

Re: Adabox 11 Problems with PyPortal

by adafruit_support_carter on Fri Jul 19, 2019 11:24 am

Yeah. Glad it was something simple.

adafruit_support_carter
 
Posts: 13904
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.