Bug: Error when submitting a microbial order
Closed this issue · 6 comments
moedarrah commented
moedarrah commented
seallard commented
Reproduced with the following order form
1603.11.microbial.xlsx
seallard commented
Error
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: 10.0.2.100 - - [07/Aug/2024:08:58:16 +0200] "POST /api/v1/submit_order/microsalt HTTP/1.0" 500 88 "https://clinical-genomics-stage.web.app/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Fi>
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: requests.exceptions.HTTPError: 400: Unavailable well: Invalid format for row. Expected numeric but got A
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: raise requests.exceptions.HTTPError(message, response=response)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/usr/local/lib/python3.11/site-packages/genologics/lims.py", line 202, in validate_response
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: self.validate_response(response, accept_status_codes)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/usr/local/lib/python3.11/site-packages/genologics/lims.py", line 209, in parse_response
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: return self.parse_response(r, accept_status_codes=[200, 201, 202])
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/usr/local/lib/python3.11/site-packages/genologics/lims.py", line 158, in post
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: result = self.post(uri, data)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/apps/lims/order.py", line 20, in save_xml
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: results = self.save_xml(sample_uri, sample_details)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/apps/lims/order.py", line 36, in save_samples
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: sample_map = self.save_samples(sample_details, map_samples=process_reagentlabels)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/apps/lims/order.py", line 90, in submit_project
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: project_data = lims_api.submit_project(
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/meta/orders/lims.py", line 28, in process_lims
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: project_data, lims_map = process_lims(
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/meta/orders/microbial_submitter.py", line 50, in submit_order
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: return submit_handler.submit_order(order=order_in)
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/meta/orders/api.py", line 89, in submit
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: ^^^^^^^^^^^
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: result: dict = api.submit(
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: File "/home/src/app/cg/server/api.py", line 86, in submit_order
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: Traceback (most recent call last):
Aug 07 08:58:16 cg-services-stage.scilifelab.se podman[3117263]: 2024-08-07 08:58:16 17f13e3841f8 cg.server.api[9] ERROR 400: Unavailable well: Invalid format for row. Expected numeric but got A
seallard commented
The issue is not present for sars, rml, nipt etc. It seems to only occur specifically for the microbial order form.
seallard commented
Flow: Order portal -> CG web API -> genologics package -> lims.
The error originates from lims, complaining about the well formatting after the genologics package submits a request against samples/batch/create
to create the samples.
seallard commented
The root cause is that the order form used for testing is invalidly formatted. Basically, it specifies wells for samples in tubes. I'll update it to make sure this does not happen again.