-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json error in get #9
Comments
I realize the response was big - 8308 bytes -- is there a limit? |
hmm -- I changed "feeds" to "groups" and it works fine. In this case there seem to be 2 responses one of 8308 byte then one of 5030 bytes
|
Good question. I didn’t even realize there was a limit before you found this. I think ideally it should attempt to grab it in chunks and assemble it if that’s possible. |
i'm not sure there is a limit, but it looked suspicious. |
the socket/requests code should do it all for you - in chunks o' 4K - we've downloaded 250KB bitmaps so that works for sure :) |
so any idea what failed? |
sorry no :/ i haven't run this demo yet - perhaps in |
OK - no problem -- I misunderstood :-) Will keep looking into it. |
np - its a mystery - and maybe i have a bug too...not sure :D also json parser may not be so great ;) |
I can take a closer look this evening. I don’t have my computer with me at the moment. |
Ah yeah, ok. I think @ladyada is correct about the JSON parser. This looks like the error message is |
As a follow-up after looking at the code, it doesn't appear to handle single quotes, or capitalized True, False, Null, etc. |
Just noticed this in the comments which I formatted a little better. "The JSON specification is at http://www.ietf.org/rfc/rfc4627.txt So yeah, it probably was outside its specs. |
FYI - an update -- I have been running the "cheerlights" demo for a long time (>24 hours) but I notice that it had stopped updating so I connected to the REPL and saw that it was connecting but reporting JSON syntax errors! I had not seen these with this demo before. However, rebooting the system made the problem go away - it connected and is updating normally again. That makes no sense to me... |
did you use this esp32 firmware? |
yep thats what we use |
ok, did you test how fast is it? i test it about 160KB/s ,but not very stable. |
yes its not stable compared to a USB wifi adapter, its meant for simple microcontrollers! |
ok, how fast can it work stable. |
there's no speed relation, it is a completely different system of using the internet. really, we recommend using a USB wifi adapter if you are on linux |
ok... |
@jerryneedell is this resolvedish? |
I think so -- At least I have not seen it in a long time -- Closing... |
oops -- closed too soon -- this issue is still present
here is the test code
as before - replacing "feeds" with "groups" works OK. |
retested after merging #44 and it still fails as above. also noticed that while using "groups" usually works, it does occasionally fail as well. |
what do you see when you print the text out before json parsing? |
I'm not sure what you are looking for... what do you want me to print out? |
|
OK -- added print(response.text) before print(response.json())
clearly truncated
|
yeah looks like its incomplete - dunno why tho |
@jerryneedell Have you made any progress on this? |
I was trying to test @brentru adafruit_io library and started getting jason errors when trying to use his "get_all_feeds" function -- I then tried the same "get" just using esp32spi (via wifimanager) and get the same error so there seems to be an underlying issue in esp32spi
here is the test case
here is the log -- with some repeated lines removed
The text was updated successfully, but these errors were encountered: