mild-blue / txmatching

Solver for kidney pair donation matching problems.
https://txm.demo.mild.blue
Other
2 stars 2 forks source link

Error 500 raised during report generation #747

Closed kubantjan closed 2 years ago

kubantjan commented 2 years ago

Reprodution steps: nejsou jednoduchy, stalo se to tak, ze proste si dal raska generovat report vcetne pacientu a ono mu to misto reportu vratilo 500, ale kdyz jsem to zkusil ja u sebe, tak mi to fungovalo a ted to funguje.

Nevim jestli jsem to spravil tim ze jsem to provolal u sebe, nebo co to bylo.

Stack trace k tomu:

022-01-13 11:14:27,590-ERROR-txmatching.utils.hla_system.compatibility_index::compatibility_index|294:: Invalid list of alleles for gene DRB1 - there have to be 1 or 2 per gene. List of patient_alleles: [HLAPerGroup(hla_group=<HLAGroup.A: 'A'>, hla_types=[HLAType(raw_code='A24', code=HLACode(None, 'A24', 'A9')), HLAType(raw_code='A32', code=HLACode(None, 'A32', 'A19'))]), HLAPerGroup(hla_group=<HLAGroup.B: 'B'>, hla_types=[HLAType(raw_code='B35', code=HLACode(None, 'B35', 'B35'))]), HLAPerGroup(hla_group=<HLAGroup.DRB1: 'DRB1'>, hla_types=[]), HLAPerGroup(hla_group=<HLAGroup.Other: 'Other'>, hla_types=[HLAType(raw_code='C4', code=HLACode(None, 'CW4', 'CW4')), HLAType(raw_code='DQB03', code=HLACode(None, None, 'DQ3')), HLAType(raw_code='DQB04', code=HLACode(None, 'DQ4', 'DQ4'))])] 2022-01-13 11:14:27,591-ERROR-txmatching.utils.hla_system.compatibility_index::compatibility_index|294:: Invalid list of alleles for gene DRB1 - there have to be 1 or 2 per gene. List of patient_alleles: [HLAPerGroup(hla_group=<HLAGroup.A: 'A'>, hla_types=[HLAType(raw_code='A24', code=HLACode(None, 'A24', 'A9')), HLAType(raw_code='A32', code=HLACode(None, 'A32', 'A19'))]), HLAPerGroup(hla_group=<HLAGroup.B: 'B'>, hla_types=[HLAType(raw_code='B35', code=HLACode(None, 'B35', 'B35'))]), HLAPerGroup(hla_group=<HLAGroup.DRB1: 'DRB1'>, hla_types=[]), HLAPerGroup(hla_group=<HLAGroup.Other: 'Other'>, hla_types=[HLAType(raw_code='C4', code=HLACode(None, 'CW4', 'CW4')), HLAType(raw_code='DQB03', code=HLACode(None, None, 'DQ3')), HLAType(raw_code='DQB04', code=HLACode(None, 'DQ4', 'DQ4'))])] [2022-01-13 11:14:27,631] ERROR in error_handler: <class 'StopIteration'>: - Traceback (most recent call last): File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/api.py", line 403, in wrapper resp = resource(*args, *kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/views.py", line 83, in view return self.dispatch_request(args, kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/resource.py", line 49, in dispatch_request resp = meth(*args, kwargs) File "/app/txmatching/auth/auth_check.py", line 38, in decorated_route return original_route(*args, *kwargs) File "/app/txmatching/auth/auth_check.py", line 60, in decorated_route return original_route(args, kwargs) File "/app/txmatching/auth/auth_check.py", line 90, in decorated_route return original_route(args, kwargs) File "/app/txmatching/web/api/report_api.py", line 86, in get directory, report_file_name = generate_pdf_report( File "/app/txmatching/database/services/report_service.py", line 156, in generate_pdf_report directory, html_file_name = generate_html_report( File "/app/txmatching/database/services/report_service.py", line 105, in generate_html_report manual_donor_recipient_scores_with_medical_ids = [ File "/app/txmatching/database/services/report_service.py", line 107, in next( StopIteration [2022-01-13 11:14:27,631] ERROR in error_handler: Unexpected error code returned 500, returning 500 instead [2022-01-13 11:14:27,631] ERROR in app: Exception on /v1/txm-event/13/reports/configs/375/matchings/1/pdf [GET] Traceback (most recent call last): File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/api.py", line 403, in wrapper resp = resource(args, kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/views.py", line 83, in view return self.dispatch_request(*args, *kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/resource.py", line 49, in dispatch_request resp = meth(args, kwargs) File "/app/txmatching/auth/auth_check.py", line 38, in decorated_route return original_route(*args, kwargs) File "/app/txmatching/auth/auth_check.py", line 60, in decorated_route return original_route(*args, *kwargs) File "/app/txmatching/auth/auth_check.py", line 90, in decorated_route return original_route(args, kwargs) File "/app/txmatching/web/api/report_api.py", line 86, in get directory, report_file_name = generate_pdf_report( File "/app/txmatching/database/services/report_service.py", line 156, in generate_pdf_report directory, html_file_name = generate_html_report( File "/app/txmatching/database/services/report_service.py", line 105, in generate_html_report manual_donor_recipient_scores_with_medical_ids = [ File "/app/txmatching/database/services/report_service.py", line 107, in next( StopIteration 2022-01-13 11:14:27,631-ERROR-txmatching.web.error_handler::error_handler|219:: <class 'StopIteration'>: - Traceback (most recent call last): File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/api.py", line 403, in wrapper resp = resource(*args, *kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/views.py", line 83, in view return self.dispatch_request(args, kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/resource.py", line 49, in dispatch_request resp = meth(*args, kwargs) File "/app/txmatching/auth/auth_check.py", line 38, in decorated_route return original_route(*args, *kwargs) File "/app/txmatching/auth/auth_check.py", line 60, in decorated_route return original_route(args, kwargs) File "/app/txmatching/auth/auth_check.py", line 90, in decorated_route return original_route(args, kwargs) File "/app/txmatching/web/api/report_api.py", line 86, in get directory, report_file_name = generate_pdf_report( File "/app/txmatching/database/services/report_service.py", line 156, in generate_pdf_report directory, html_file_name = generate_html_report( File "/app/txmatching/database/services/report_service.py", line 105, in generate_html_report manual_donor_recipient_scores_with_medical_ids = [ File "/app/txmatching/database/services/report_service.py", line 107, in next( StopIteration 2022-01-13 11:14:27,631-ERROR-txmatching.web.error_handler::error_handler|233:: Unexpected error code returned 500, returning 500 instead 2022-01-13 11:14:27,631-ERROR-txmatching.web::app|1454:: Exception on /v1/txm-event/13/reports/configs/375/matchings/1/pdf [GET] Traceback (most recent call last): File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/api.py", line 403, in wrapper resp = resource(args, kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask/views.py", line 83, in view return self.dispatch_request(*args, *kwargs) File "/opt/conda/envs/txmatching/lib/python3.8/site-packages/flask_restx/resource.py", line 49, in dispatch_request resp = meth(args, kwargs) File "/app/txmatching/auth/auth_check.py", line 38, in decorated_route return original_route(*args, kwargs) File "/app/txmatching/auth/auth_check.py", line 60, in decorated_route return original_route(*args, *kwargs) File "/app/txmatching/auth/auth_check.py", line 90, in decorated_route return original_route(args, kwargs) File "/app/txmatching/web/api/report_api.py", line 86, in get directory, report_file_name = generate_pdf_report( File "/app/txmatching/database/services/report_service.py", line 156, in generate_pdf_report directory, html_file_name = generate_html_report( File "/app/txmatching/database/services/report_service.py", line 105, in generate_html_report manual_donor_recipient_scores_with_medical_ids = [ File "/app/txmatching/database/services/report_service.py", line 107, in next( StopIteration

kubantjan commented 2 years ago

Nedokazame zreprodukovat, zaviram zatim