Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the exception?
#3
Note: you forgot to make an instance of CurrencyRates

Looking at the Github source
The get_rate method raises
RatesNotAvailableError
See
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:
Mark17 likes this post
Reply


Messages In This Thread
What is the exception? - by Mark17 - Aug-18-2021, 03:28 PM
RE: What is the exception? - by deanhystad - Aug-18-2021, 04:25 PM
RE: What is the exception? - by Yoriz - Aug-18-2021, 04:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  During handling of the above exception, another exception occurred Skaperen 7 27,075 Dec-21-2018, 10:58 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020