Note: you forgot to make an instance of
Looking at the Github source
The get_rate method raises
RatesNotAvailableError
See
You will be stuck in an infinite loop
CurrencyRates
Looking at the Github source
The get_rate method raises
RatesNotAvailableError
See
- raise RatesNotAvailableError("Currency Rate {0} => {1} not available for Date {2}".format( base_cur, dest_cur, date_str))
- raise RatesNotAvailableError("Currency Rates Source Not Ready")
try: res = currency_rates.get_rate('USD', country, date) except RatesNotAvailableError as error: print(f"Error raised: {error}"
You will be stuck in an infinite loop
success
is never altered from False
while success == False: