Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data past 12th June 2021 for USD to EUR pair #93

Open
pat42w opened this issue Jun 22, 2021 · 3 comments
Open

No data past 12th June 2021 for USD to EUR pair #93

pat42w opened this issue Jun 22, 2021 · 3 comments

Comments

@pat42w
Copy link

pat42w commented Jun 22, 2021

Currently using v1.6 :
When I run for dates before the 12th all is fine
get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-11','%Y-%m-%d'))

0.8247422680412372

however when I try for 12th or later I get
get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-12', '%Y-%m-%d'))

RatesNotAvailableError Traceback (most recent call last)
ipython-input-54-01a85e164fe5 in module
get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-12', '%Y-%m-%d'))
~\AppData\Local\Continuum\anaconda3\lib\site-packages\forex_python\converter.py in get_rate(self, base_cur, dest_cur, date_obj)
77 base_cur, dest_cur, date_str))
78 return rate
79 raise RatesNotAvailableError("Currency Rates Source Not Ready")
80
81 def convert(self, base_cur, dest_cur, amount, date_obj=None):
RatesNotAvailableError: Currency Rates Source Not Ready

@pat42w
Copy link
Author

pat42w commented Jun 22, 2021

Wait this is just weekends, is there is there a workaround for weekend data other than just the error using last days data etc?

@zelenij
Copy link

zelenij commented Jun 27, 2021

Usually rates are not updated over the weekends, so there isn't much you can do

@ddofborg
Copy link

ddofborg commented Aug 9, 2022

Best is to have at least a way to continue. Maybe take the last non weekend rate? Plus of course show a better error message. We also have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants