Unable to load report. Please try again later

37 views
Skip to first unread message

Paolo Togni

unread,
Apr 3, 2024, 2:51:04 AMApr 3
to QATrack+
Hello everybody,

when I try to open a saved report template it does not work and it get the error: 
'Unable to load report. Please try again later' (see enclosed print screen).

Now, I can create a new report but it is quite annoying to do it for all the 10 reports I need.
Also the not working reports cannot be deleted so I can just add new reports creating a bit of confusion.
This is not the first I time I facing this problem. The first time it was during a QAtrack+ update, I guess from 0.3.x to 3.x, but now it append without an apparent reason.

Does anybody have an idea what can generate this issue, how can I avoid and fix it?
How can I delete old report template (not working)?

Best Regards
Paolo 




report.jpg

Randle Taylor

unread,
Apr 3, 2024, 11:50:50 AMApr 3
to Paolo Togni, QATrack+
Hi Paolo,  I have seen this issue before and it's usually caused by the report filters being incorrectly stored in the db due to a bug with how we serialize things to JSON.  If you look at the report filters of the Saved Reports in the admin you will likely see that they are serialized like:

{'work_completed': 'Last Month', 'unit_test_collection__unit__site': [], 'unit_test_collection__unit': [], 'unit_test_collection__frequency': [], 'unit_test_collection__assigned_to': []}

with single quotes, which is not valid JSON (json uses double quotes!).  I can't remember if I ever figured out why this is happening but to fix it you should be able to activate your virtualenv, run `python manage.py shell_plus`  then do:

import ast
for sr in SavedReport.objects.all():
    if isinstance(sr.filters, str):
        sr.filters = ast.literal_eval(sr.filters)
        sr.save()

Randy

--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qatrack/10a2d972-1019-46e8-9ac7-aa8ed14d98dcn%40googlegroups.com.

Paolo Togni

unread,
Apr 10, 2024, 2:38:49 AMApr 10
to QATrack+
Randy,

thank you for your reply.
I've tried to solve the problem via shell_plus as you suggested but it was not working.
BTW I managed to make it work manually replacing ' with  " in each report filter.

BR
Paolo
Reply all
Reply to author
Forward
0 new messages