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

Can't open main page because of currencies #1239

Closed
rakoo opened this issue Oct 2, 2023 · 4 comments
Closed

Can't open main page because of currencies #1239

rakoo opened this issue Oct 2, 2023 · 4 comments

Comments

@rakoo
Copy link

rakoo commented Oct 2, 2023

I seem to encounter the issue with currencies, mentioned in #1229 and in #1232, but I can't even open the home page:

ERROR [ihatemoney.run] Exception on / [GET]
Traceback (most recent call last):
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/flask_restful/__init__.py", line 298, in error_router
    return original_handler(e)
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/web.py", line 276, in home
    project_form = get_project_form()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/web.py", line 271, in get_project_form
    return ProjectForm()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/wtforms/form.py", line 208, in __call__
    return type.__call__(cls, *args, **kwargs)
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/forms.py", line 153, in __init__
    for currency_name in self.currency_helper.get_currencies()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/currency_convertor.py", line 31, in get_currencies
    for rate in self.get_rates()
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/cachetools/__init__.py", line 520, in wrapper
    v = func(*args, **kwargs)
  File "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/currency_convertor.py", line 24, in get_rates
    rates = requests.get(self.api_url).json()["rates"]
KeyError: 'rates'

Because of this I can't even see my current bills.

Version: 5.2.0~ynh3 (Running on yunohost)

@almet
Copy link
Member

almet commented Oct 2, 2023

Hi, I suspect this is similar to 9341dc2

An upgrade should make it work.

@almet almet closed this as completed Oct 2, 2023
@zorun
Copy link
Collaborator

zorun commented Oct 2, 2023

Apparently yunohost still has IHM 5.2.0

They should upgrade to 6.1.0 at least

The upcoming 6.1.1 will get more currency-related hotfixes, but if yunohost maintainers read this, don't wait for it!

@dylanmorroll
Copy link

Hey, so on this note, I can see the list of currencies again in the project settings, which is great! Thanks :)

Also, adding bills in the project's default currency is working again. However, adding bills in the non-default currency results in an error:

image

I'm not sure if this is being tracked somewhere else, but thought I would bring it up. Thanks for the great work :)

@almet
Copy link
Member

almet commented Oct 9, 2023

Thanks for the feedback. This is tracked in #1232

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

4 participants