Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 775
    • Issues 775
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 92
    • Merge requests 92
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TrytonTryton
  • TrytonTryton
  • Issues
  • #11731
Closed
Open
Issue created Sep 23, 2022 by Raimon Esteve@resteve

currency test don't pass when Currency Rates Source Not Ready (forex)

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking