Current Behaviour
OS platform
Python version
Dependencies
import asyncio
import httpx
async def get():
r = await httpx.get("https://eodhistoricaldata.com")
print(r)
asyncio.run(get())
Causes the following error:
Traceback (most recent call last):
File "/home/USER/miniconda3/envs/project/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 149, in connect_tcp
addr_obj = ip_address(remote_host)
File "/home/USER/miniconda3/envs/project/lib/python3.9/ipaddress.py", line 53, in ip_address
raise ValueError('%r does not appear to be an IPv4 or IPv6 address' %
ValueError: 'eodhistoricaldata.com' does not appear to be an IPv4 or IPv6 address
However using the synchronous client does not raise any error:
>>> import requests
>>> requests.get("https://eodhistoricaldata.com")
<Response [200]>
Expected Behaviour