adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 37 forks source link

syntax error in JSON when using adafruit_io for fetching data from AIO #37

Closed axelmagnus closed 1 year ago

axelmagnus commented 4 years ago

Well, i was recommended by Brent to file this here as well. Im tryin to display my AIO data on a pyportal.

Adafruit PyPortal with samd51j20 adafruit-circuitpython-bundle-6.x-mpy-20200925 also tried request v 1.6.0.

Please see https://forums.adafruit.com/viewtopic.php?f=56&t=170049&p=831555 for code and experiences. (i cant get the formatting to work)

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. code.py output: Retrieving new Adafruit IO feed... Socket missing recv_into. Using more memory to be compatible Traceback (most recent call last): File "code.py", line 56, in File "adafruit_io/adafruit_io.py", line 583, in receive_all_data File "adafruit_io/adafruit_io.py", line 539, in _get File "adafruit_requests.py", line 343, in json File "adafruit_requests.py", line 339, in json ValueError: syntax error in JSON

brentru commented 4 years ago

This issue may be related to https://github.com/adafruit/Adafruit_CircuitPython_Requests/issues/39, looking into this in a bit...

ghost commented 3 years ago

Getting similar error from Worldtimeapi, instead of AIO ... Originally had this error report show up in MagTag Project selector (Issue #23) ... It was then moved to PortalBase as it appeared problem was in there ... Did not think to check the requests att because the PortalBase error occurred most often ... Now with either 6.2.0 or 6.2.0-rc.0, the following traceback occurs on a consistent basis:

_Retrieving data...Traceback (most recent call last): File "code.py", line 128, in File "/projects/3WzRocket.py", line 202, in File "/projects/3WzRocket.py", line 128, in take_a_nap File "adafruit_requests.py", line 347, in json File "adafruitrequests.py", line 343, in json ValueError: syntax error in JSON

My source code was posted with MagTag Project Issue #23 ...

Backed down to 6.1.0 release & only get syntax error on startup occasionally but not on a consistent basis ...

brentru commented 3 years ago

@akbykraz The issue you linked is for a CoC update, do you have another link?

ghost commented 3 years ago

@brentru ... Sorry don't know what CoC is ... Not sure what link you are referring to ... Only link is to MagTag Project #23 which was moved to PortalBase issues ... Added note here as error traceback seemed similar to this error ...

brentru commented 3 years ago

You linked to https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/23 which is not the magtag project, it's a pull request for "Update Code of Conduct #23". Did you mean to link something else?

ghost commented 3 years ago

Sorry ... Link was suppose to be pointing to the MagTag Project Selector (#23) which was moved to PortalBase repo ... Was under the impression that the (# 23) was a link to my original post ... (I just now saw the drop-down for the 23 number entry) ... My keyboarding entries are done sometimes without my looking @ the screen, missed that spelling completion/correction drop-down ... My bad ... New to all this stuff so I apparently don't have a clue sometimes ... Sorry

DJDevon3 commented 1 year ago

@axelmagnus Can we close this issue? It's from circuit python 6.0 and has likely long since been resolved.

axelmagnus commented 1 year ago

fine with me! thanks!