Replies: 1 comment
-
100% stable is a long shot when network connections can't be, but this won't run out of memory on you:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use the following code snippet to get api time:
def getapitime():
response=urequests.request('GET', "http://worldtimeapi.org/api/timezone/Europe/Copenhagen")
parsed = response.json()
return str(parsed["datetime"])
Sometimes it works but most often it does not (sometimes responding with "OSError: [Errno 104] ECONNRESET", sometimes responding with "IndexError: list index out of range"). How can I make it 100 % stable?
Poul Riis
Beta Was this translation helpful? Give feedback.
All reactions