Trying to run a app in vs code in ubuntu using django, and getting connection error at / (newbie here)

made a app and project using django in vs code and used the covid9api

also i am using ubuntu in oracle vm

ConnectionError at /

HTTPSConnectionPool(host='api.covid9api.com', port=443): Max retries exceeded with url: /countries (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f306d7cca90>: Failed to establish a new connection: [Errno -2] Name or service not known'))

Request Method:     GET
Request URL:    http://127.0.0.1:6000/
Django Version:     4.1.4
Exception Type:     ConnectionError
Exception Value:    

HTTPSConnectionPool(host='api.covid9api.com', port=443): Max retries exceeded with url: /countries (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f306d7cca90>: Failed to establish a new connection: [Errno -2] Name or service not known'))

Exception Location:     /usr/lib/python3/dist-packages/requests/adapters.py, line 516, in send
Raised during:  newapp.views.home
Python Executable:  /usr/bin/python3
Python Version:     3.10.6
Python Path:    

['/home/void/python/newproject/sports',
 '/usr/lib/python310.zip',
 '/usr/lib/python3.10',
 '/usr/lib/python3.10/lib-dynload',
 '/home/void/.local/lib/python3.10/site-packages',
 '/usr/local/lib/python3.10/dist-packages',
 '/usr/lib/python3/dist-packages']

Server time:    Mon, 19 Dec 2022 07:16:23 +0000


[this is the error](https://i.stack.imgur.com/yNWHs.png)
Back to Top