You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several times during testing while using the urequests library i get a BadStatusLine Error in Thonny, the line below this error message is [] after checking my server log files a 200 status code was sent
try:
if not data:
r=urequest.get(page)
else:
r=urequest.post(page,data=json_encode(data),headers={"Content-type":"application/json"})
except BadStatusLine:
#No idea why this happens, line is returned as []
#My server log files disagree
print("ERROR: BadStatusLine; Ignore")
except Exception as e:
print("ERROR:",e)
in my use case i have a input polling loop running on core 0 and uasyicio running on core 1 via _thread, urequests is called from core 1
The text was updated successfully, but these errors were encountered:
def http(page,data=False,err=False):
if not err:
page="http://10.0.0.69:8080/"+page
if not GPIO.nic.isconnected():
print("----------NO NETWORK----------")
return False
try:
if not data:
r=urequest.get(page)
else:
r=urequest.post(page,data=json_encode(data),headers={"Content-type":"application/json"})
except Exception as e:
print("urequest ERROR:",e)
print(GPIO.nic.regs())
return False
if r.status_code == 200 and r.content == b"OK":
r.close()
r=True
else:
r.close()
r=False
return r
Board: W5500-EVB-PICO
FW: v2.0.0 firmware.uf2
Several times during testing while using the urequests library i get a
BadStatusLine
Error in Thonny, the line below this error message is[]
after checking my server log files a 200 status code was sentin my use case i have a input polling loop running on core 0 and
uasyicio
running on core 1 via_thread
,urequests
is called from core 1The text was updated successfully, but these errors were encountered: