'HTTPSConnectionPool Max retries exceeded api.ratesapi.io
I am getting an HTTP connection failure while trying to use some currency rates.
I am confuse if this is a connection issue or simply the call is invalid.
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.ratesapi.io', port=443): Max retries exceeded with url: /api/latest?base=EUR&symbols=USD&rtype=fpy (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb3d1605820>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
from forex_python.converter import CurrencyRates
from datetime import date
print("-----")
today = date.today()
CcyTarget: str = 'USD'
c = CurrencyRates()
# Class Cash
class Cash:
def __init__(self, Account, CcyOutput):
self.CcyOutput = CcyOutput
self.Account = Account
def ccy_alignment_method(self):
return c.convert("EUR", CcyTarget, self.Account)
# Class Def
BANK = Cash(9999, CcyTarget)
Total_Cash_inCCYTarget = BANK.ccy_alignment_method()
Would you able to identify the blocking point ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
