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

Waffle plot errors on dashboard #467

Closed
mbarton opened this issue Jan 8, 2025 · 0 comments · Fixed by #469
Closed

Waffle plot errors on dashboard #467

mbarton opened this issue Jan 8, 2025 · 0 comments · Fixed by #469
Assignees

Comments

@mbarton
Copy link
Member

mbarton commented Jan 8, 2025

Screenshot 2025-01-08 15 41 19

Screenshot 2025-01-08 15 46 52

Generate an example CSV following the example commands from the generator README:

docker compose exec django python manage.py create_csv \
        --pts=5 \
        --visits="CDCD DHPC ACDC CDCD" \
        --hb_target=T \
        --age_range=11_15
        --build

docker compose exec django python manage.py create_csv --coalesce

File attached for convenience: coalesced_20250108152244.csv

Upload that CSV and then view the dashboard. You get an error calculating the cards with waffle plots:

django-1   | INFO [django.server] "GET /get_waffle_chart_partial?T2DM=20&Other%20rare%20forms=80 HTTP/1.1" 200 120                                            
django-1   | WARNING [project.npda.views.decorators:23] User SuperuserAda  has bypassed 2FA for <function get_simple_bar_chart_pcts_partial at 0x71dcb4cee660>
 as settings.DEBUG is True                                                                                                                                    
django-1   | WARNING [project.npda.views.decorators:23] User SuperuserAda  has bypassed 2FA for <function get_waffle_chart_partial at 0x71dcb4cee0c0> as setti
ngs.DEBUG is True                                                                                                                                             
django-1   | ERROR [project.npda.views.dashboard.partials:258] Error generating waffle chart                                                                  
django-1   | Traceback (most recent call last):                                                                                                               
django-1   |   File "/app/project/npda/views/dashboard/partials.py", line 178, in get_waffle_chart_partial                                                    
django-1   |     for idx, (label, num_squares) in enumerate(data):                                                                                            
django-1   |              ^^^^^^^^^^^^^^^^^^^^                                                                                                                
django-1   | ValueError: too many values to unpack (expected 2)
@mbarton mbarton changed the title Error on total eligible patients in dashboard Waffle plot errors on dashboard Jan 8, 2025
@mbarton mbarton self-assigned this Jan 9, 2025
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

Successfully merging a pull request may close this issue.

1 participant