Issue 11731

Title
currency test don't pass when Currency Rates Source Not Ready (forex)
Priority
bug
Status
closed
Nosy list
ced, resteve
Assigned to
Keywords

Created on 2022-09-23.19:11:20 by resteve, last changed 1 week ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-09-28.09:50:06

The site is back on.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-09-23.19:33:06
Author: [hidden] (resteve)
Date: 2022-09-23.19:11:20

Yesterday, 22/sep night we detected that currency test don't pass:

Error:

File "/tryton/trytond/trytond/modules/currency/tests/scenario_currency_rate_update.rst", line 49, in scenario_currency_rate_update.rst
Failed example:
    rate = [r for r in eur.rates if r.date < today][0]
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.9/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest scenario_currency_rate_update.rst[24]>", line 1, in <module>
        rate = [r for r in eur.rates if r.date < today][0]
    IndexError: list index out of range

Debug:

Traceback (most recent call last):
    File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/modules/currency/currency.py", line 443, in fetch_ecb
        return get_rates(self.currency.code, date)
    File "/home/raimon/.virtualenvs/nandev2/lib/python3.9/site-packages/forex_python/converter.py", line 62, in get_rates
        raise RatesNotAvailableError("Currency Rates Source Not Ready")
forex_python.converter.RatesNotAvailableError: Currency Rates Source Not Ready
History
Date User Action Args
2022-09-28 09:50:06cedsetmessages: + msg78362
status: deferred -> closed
2022-09-25 20:09:54cedsetpriority: feature -> bug
type: crash -> behavior
2022-09-23 19:33:06cedsetmessages: + msg78287
nosy: + ced
status: chatting -> deferred
2022-09-23 19:11:20restevecreate

Showing 10 items. Show all history (warning: this could be VERY long)