If I use VScode and the requests library I can pull the json data and create a basic monster.
But when I try to get the data to display using micropython and the urequests library I’m getting the following:
Data obtained!
<Response object at 2001b850>
Traceback (most recent call last):
File “”, line 7, in
File “requests/init.py”, line 33, in json
ValueError: syntax error in JSON
This was done from requests in VScode. When i try to use urequests in micropython on the Raspberry Pi Pico I get the syntax error message. I have the Badger 2040W - it has a preinstalled file that collects weather api data with urequests - that seems to work ok. It’s only when I use the glitch link that I can’t get it to collect the json.
are the 200 and <class 'dict'> part of the response? or are they other logs? the stuff that follows from { to } looks fine
edit: I tried loading the url from my browser and the JSON looks fine from there too.
can you get a copy of the exact request urequests sends? maybe it’s missing a User-Agent header or something. that would get you a 403 (?) error from Glitch. oh yeah, try adding code to check that the response is 200 OK