Closed jepler closed 3 years ago
Thanks for the testing!
Just ran across this same issue while upgrading my pyportal to CP6.0 and Adafruit_CircuitPython_Requests-1.8.0.zip thanks to @anecdata on discord for pointing me to this request - fetched and install source .py file solved the problem for me too!
thankx!!
I think there are still some .split
methods being used on objects that, at least in some circumstances, are bytearrays:
File "adafruit_requests.py", line 692, in get
File "adafruit_requests.py", line 568, in request
File "adafruit_requests.py", line 277, in close
AttributeError: 'bytearray' object has no attribute 'split'
@anecdata I am seeing this as well. It seems like it works the first call and then not on subsequent calls. But my testing was limited to response = requests.get("https://io.adafruit.com/api/v2/time/seconds")
. Were you also using the io time API?
@askpatrickw I was GETting from my own server, but like yours it seems to happen on the first call in code.py. I didn't explore it too deeply... it's very intermittent and I wasn't catching it, so I reset.
@anecdata Found it... see PR #56
Closes #52
On CircuitPython, bytearray objects have no split method. Emulate the specific form that we need.
Testing performed: tests still pass, and it works on a device.