# Long running code suddenly raising an error

**URL:** <https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598>\
**Category:** API and Webhooks\
**Created:** [June 2, 2021, 7:17am UTC](https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598 "2021-06-02T07:17:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shlomi.fenster](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@shlomi.fenster](https://devforum.zoom.us/u/shlomi.fenster)\
**Post date:** [June 2, 2021, 7:17am UTC](https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598/1 "2021-06-02T07:17:19Z")

</div>

I’ve been using the api via python code for months with no problems.  
This morning I woke up to an error message I’ve never seen, which was obviously strange due to there being no changes in my code…  
The relevant part of code that’s suddenly failing is a get-query for listing all available recordings, as so -

> payload = {‘iss’: API\_KEY, ‘exp’: time.time() + 60}  
> jwt\_encoded = jwt.encode(payload, API\_SECRET).decode(‘utf-8’)  
> conn = http.client.HTTPSConnection(“[api.zoom.us](http://api.zoom.us)”)  
> headers = {‘authorization’: f"Bearer {jwt\_encoded}“}  
> conn.request(“GET”, f”/v2/users/{USER\_EMAIL}/recordings?from=2010-11-22", headers=headers)

Specifically I’m getting the following error:

> Traceback (most recent call last):  
> File “/home/autozoom3125/process\_new\_meetings.py”, line 406, in   
> update\_available\_zoom\_recordings()  
> File “/home/autozoom3125/process\_new\_meetings.py”, line 62, in update\_available\_zoom\_recordings  
> conn.request(“GET”, “/v2/users/#######/recordings?from=2010-11-22”, headers=headers)  
> File “/usr/lib/python3.8/http/client.py”, line 1230, in request  
> self.\_send\_request(method, url, body, headers, encode\_chunked)  
> File “/usr/lib/python3.8/http/client.py”, line 1276, in \_send\_request  
> self.endheaders(body, encode\_chunked=encode\_chunked)  
> File “/usr/lib/python3.8/http/client.py”, line 1225, in endheaders  
> self.\_send\_output(message\_body, encode\_chunked=encode\_chunked)  
> File “/usr/lib/python3.8/http/client.py”, line 1004, in \_send\_output  
> self.send(msg)  
> File “/usr/lib/python3.8/http/client.py”, line 944, in send  
> self.connect()  
> File “/usr/lib/python3.8/http/client.py”, line 1392, in connect  
> super().connect()  
> File “/usr/lib/python3.8/http/client.py”, line 915, in connect  
> self.sock = self.\_create\_connection(  
> File “/usr/lib/python3.8/socket.py”, line 787, in create\_connection  
> for res in getaddrinfo(host, port, 0, SOCK\_STREAM):  
> File “/usr/lib/python3.8/socket.py”, line 914, in getaddrinfo  
> for res in \_socket.getaddrinfo(host, port, family, type, proto, flags):  
> socket.gaierror: [Errno -3] Temporary failure in name resolution

Has something changed in the api? What am I (suddenly) doing wrong?

Thanks!  
Shlomi

---

<div class="post-metadata">

**Author:** ![shlomi.fenster](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@shlomi.fenster](https://devforum.zoom.us/u/shlomi.fenster)\
**Post date:** [June 2, 2021, 7:04pm UTC](https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598/2 "2021-06-02T19:04:33Z")

</div>

Um, this is kind of urgent, because it’s upholding a specific functionality on a web-site serving hundreds of people daily. (Not a lot, but enough to be very important to me).  
Anyone?  
Thanks!

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [June 3, 2021, 3:07pm UTC](https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598/3 "2021-06-03T15:07:30Z")

</div>

Hi @shlomi.fenster,

Thanks for reaching out about this. Based on the details you’ve shared here, it seems this error may be related to your environment/code, rather than the Zoom API specifically.

Have you tried sending the request from Postman, cURL, etc. to see if you run into any issues?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 4, 2021, 1:08am UTC](https://devforum.zoom.us/t/long-running-code-suddenly-raising-an-error/51598/4 "2021-07-04T01:08:13Z")

</div>

Closed on July 4, 2021, 1:08am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
