ESP32 Freezes When Printing urequests.get().text

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
SakthiSanthosh_
Posts: 1
Joined: Fri Jan 21, 2022 11:05 am

ESP32 Freezes When Printing urequests.get().text

Post by SakthiSanthosh_ » Fri Jan 21, 2022 11:25 am

I tried retrieving data from Blynk Cloud. The request is made successfully and I got a 200 status code (Using status_code attribute). However, while trying to print the data received (Using the text attribute), the output freezes. This happens only when retrieving data from Blynk Cloud and not with other links. I tried the same with requests.py on my laptop and it prints the retrieved value properly. Please help me with this.
Code: Click here
Image

KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

Re: ESP32 Freezes When Printing urequests.get().text

Post by KJM » Fri Jan 21, 2022 9:48 pm

That least else seems wrong, no 'if' or 'for' before it. Maybe replace it with 'if request'

Post Reply