No address associated with hostname when interfacing with telegrambot

Greetings! I am trying to send voice audios to my space via a telegrambot but I am receiving this DNS related error.
I found this possibly related issue: Got "cURL error 6: Could not resolve host:" Error · Issue #293 · irazasyed/telegram-bot-sdk · GitHub
So I checked the contents of the space’s /etc/resolv.conf:

search spaces-v2.svc.cluster.local svc.cluster.local cluster.local ec2.internal
options ndots:5

Here is the full output:

  File "/home/user/.local/lib/python3.10/site-packages/requests/", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /bot6974782337:xxxx/getUpdates?limit=100&timeout=20 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f3b080d73a0>: Failed to resolve '' ([Errno -5] No address associated with hostname)"))

Is this type of connection not allowed?

I’m having the same problem. I experienced the same issue while sending a request to my Telegram bot via the Telegram bot API URL.