Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3552

MicroPython • Re: How to get connected after a machine.reset

$
0
0
I'm now remembering (seniors moment) that I had a similar issue with urequest.get. The solution was to close the SOCKET to release resources.

Code:

        from urequests import get as req_get        ...        payload = req_get(url=r_params.world_datetime_server)        pl_dict=json_loads(payload.text)                payload.close() # Close socket to free resources
Yes, I have made sure that I close the SOCKET each time I make a urequest call already. So that is probably not the cause of my problems. Thanks for the thought though.

I have switched over to using PuTTy to monitor the output from my program instead of Thonny. Will see if I can learn anything more.

Statistics: Posted by nanowizz — Tue Jan 16, 2024 5:58 am



Viewing all articles
Browse latest Browse all 3552

Trending Articles