We've been using the currencyconverter for a year or so but it only started happening recently.
We're using the latest version (0.14.4).
Full traceback:
self.currency_converter: CurrencyConverter = CurrencyConverter(CURRENCY_UP_TO_DATE_PATH, fallback_on_missing_rate=True)
File "/usr/local/lib/python3.8/site-packages/currency_converter/currency_converter.py", line 154, in init
self.load_file(currency_file)
File "/usr/local/lib/python3.8/site-packages/currency_converter/currency_converter.py", line 160, in load_file
content = urlopen(currency_file).read()
File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.8/urllib/request.py", line 1379, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/local/lib/python3.8/urllib/request.py", line 1353, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
When creating the CurrencyConverter using the file with the full history ('https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip'), the currency converter often fails on URLError. This is not consistent as it doesn't always fail.
We've been using the currencyconverter for a year or so but it only started happening recently.
We're using the latest version (0.14.4).
Full traceback: self.currency_converter: CurrencyConverter = CurrencyConverter(CURRENCY_UP_TO_DATE_PATH, fallback_on_missing_rate=True) File "/usr/local/lib/python3.8/site-packages/currency_converter/currency_converter.py", line 154, in init self.load_file(currency_file) File "/usr/local/lib/python3.8/site-packages/currency_converter/currency_converter.py", line 160, in load_file content = urlopen(currency_file).read() File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/local/lib/python3.8/urllib/request.py", line 1379, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/local/lib/python3.8/urllib/request.py", line 1353, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>