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

Error in card_diaperchange_types #890

Closed
Tracked by #893
thib3113 opened this issue Oct 27, 2024 · 5 comments
Closed
Tracked by #893

Error in card_diaperchange_types #890

thib3113 opened this issue Oct 27, 2024 · 5 comments
Labels
bug Reports of unexpected problems or errors i18n/L10n Issues relating to internationalization and/or localization
Milestone

Comments

@thib3113
Copy link
Contributor

thib3113 commented Oct 27, 2024

Doing nothing, just going to the app I get the error (every refresh) :

Exception Type:	KeyError
Exception Value:	
7
Exception Location: /app/www/public/dashboard/templatetags/cards.py, line 86, in card_diaperchange_types

It seems that in /app/www/public/dashboard/templatetags/cards.py on the line 86, key was 7, but stats is limited to 6 .

stats[key]["changes"] += 1

Maybe linked with time change ? ( but it always crash on every refresh ) .

I'm using timezone Europe/Paris


In the part "local vars" of the debug page I see :

max_date	
datetime.datetime(2024, 10, 28, 0, 0, 0, 995083, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris'))
min_date	
datetime.datetime(2024, 10, 21, 0, 0, 0, 995083, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris'))
@markstor
Copy link

Same here with Europe/Madrid. Changing the user timezone to Etc/GMT-1 served as a workaround

@thib3113
Copy link
Contributor Author

thib3113 commented Oct 27, 2024

as a workaround, I've done a little change here :

key = (max_date - instance.time).days

-key = (max_date - instance.time).days
+key = min((max_date - instance.time).days, 6)

it will not fix the real problem ... and return false stats ... but it allow to use the app

@Coupyrulz
Copy link

Same here with Europe/Madrid. Changing the user timezone to Etc/GMT-1 served as a workaround

How do you set this if I can't access the dashboard to edit users?

@thib3113
Copy link
Contributor Author

@Coupyrulz can you access /user/settings/ of your installation ?

@cdubz cdubz added bug Reports of unexpected problems or errors i18n/L10n Issues relating to internationalization and/or localization labels Nov 2, 2024
cdubz added a commit that referenced this issue Nov 2, 2024
Addresses some obvious and subtle issues having to do with handling for
date math when dates are affected by DST.

Refs: #893, #892, #890, #792
@cdubz
Copy link
Member

cdubz commented Nov 2, 2024

This specific issue will be fixed in the next release. Continuing to track others over at #893

@cdubz cdubz closed this as completed Nov 2, 2024
@cdubz cdubz added this to the 2.6.1 milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reports of unexpected problems or errors i18n/L10n Issues relating to internationalization and/or localization
Projects
None yet
Development

No branches or pull requests

4 participants