alexprengere / currencyconverter

A Python currency converter using the European Central Bank data.
http://alexprengere.github.io/currencyconverter
Apache License 2.0
215 stars 59 forks source link

Rates Not Updating #23

Closed tyronecragg closed 3 years ago

tyronecragg commented 3 years ago

Hi there,

It appears to me that the rates in the package haven't updated for over a month. When I run a conversion request for today's date, for example:

c.convert(1, 'EUR', 'USD', date=date(2020, 11, 16))

the package returns the error:

RateNotFoundError: 2020-11-16 not in USD bounds 1999-01-04/2020-09-24

I would have expected the rates to update more frequently, but is this the intended behaviour of the package?

Thanks!

tyronecragg commented 3 years ago

Apologies, I found a closed issue that addresses this.

alexprengere commented 3 years ago

Hi! No problem, the fact that this has come up more than once is probably a sign that the documentation could be improved. More details in #18, but for those who are reading this, the data embedded in the library is not updated often (on PyPI). If you need the latest rates, you can just do:

from currency_converter import CurrencyConverter
c = CurrencyConverter('http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip')