question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting "500 Server Error: Internal Server Error" while running segmentation model in OHIF

See original GitHub issue

Hello Project-MONAI Team,

I have built the OHIF viewer plugin and the Orthanc server by following this link. The OHIF viewer is being connected with the MONAI Label as I can see the MONAI Label app and segmentation model name. But, When I am clicking on the segmentation model run button it is throwing an error. I am sharing the error trace below.

[2021-10-31 10:01:23,347] [4803] [MainThread] [INFO] (dicomweb_client.api:2147) - retrieve series "1.3.46.670589.10.1.1.2163374719.1137684481.588647" of study "1.2.124.113532.192.70.134.138.20060119.151934.4823473"
[2021-10-31 10:01:23,352] [4803] [MainThread] [ERROR] (uvicorn.error:399) - Exception in ASGI application
Traceback (most recent call last):
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/fastapi/applications.py", line 199, in __call__
    await super().__call__(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/middleware/cors.py", line 86, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/middleware/cors.py", line 142, in simple_response
    await self.app(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/routing.py", line 580, in __call__
    await route.handle(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/routing.py", line 241, in handle
    await self.app(scope, receive, send)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/starlette/routing.py", line 52, in app
    response = await func(request)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/fastapi/routing.py", line 214, in app
    raw_response = await run_endpoint_function(
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/fastapi/routing.py", line 149, in run_endpoint_function
    return await dependant.call(**values)
  File "/home/kevinp/MONAILabel/monailabel/endpoints/infer.py", line 149, in run_inference
    result = instance.infer(request)
  File "/home/kevinp/MONAILabel/monailabel/interfaces/app.py", line 209, in infer
    request["image"] = datastore.get_image_uri(request["image"])
  File "/home/kevinp/MONAILabel/monailabel/datastore/dicom.py", line 64, in get_image_uri
    dicom_web_download_series(None, image_id, image_dir, self._client)
  File "/home/kevinp/MONAILabel/monailabel/datastore/utils/dicom.py", line 73, in dicom_web_download_series
    instances = client.retrieve_series(study_id, series_id)
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/dicomweb_client/api.py", line 2212, in retrieve_series
    self._get_series(
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/dicomweb_client/api.py", line 2161, in _get_series
    return self._http_get_multipart_application_dicom(
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/dicomweb_client/api.py", line 1054, in _http_get_multipart_application_dicom
    response = self._http_get(
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/dicomweb_client/api.py", line 616, in _http_get
    response.raise_for_status()
  File "/home/kevinp/MONAILabel/env/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://127.0.0.1:8042/dicom-web//studies/1.2.124.113532.192.70.134.138.20060119.151934.4823473/series/1.3.46.670589.10.1.1.2163374719.1137684481.588647

I am not sure if this is from MONAI Label or OHIF viewer or Orthanc server but I guess it may be from the Orthanc server.

Thank you in advance

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
kevinpatel13896commented, Nov 10, 2021

@aihsani After following the shared instructions, it’s working fine now. However, I have followed the same steps earlier but unfortunately, it didn’t work.

Thank you so much @aihsani @SachidanandAlle and the whole MONAILabel Team for the support.

1reaction
aihsanicommented, Nov 9, 2021

@kevinpatel13896 have you followed the script in the code box under: https://docs.monai.io/projects/label/en/latest/quickstart.html#ubuntu … We found that there are compatibility issues if the .so files aren’t updated independently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

openresty internal server error #2120 - OHIF/Viewers - GitHub
I am using centos 7 and docker to build ohif and orthanc, ... but I get 500 Internal Server error when I access...
Read more >
How to Fix a 500 Internal Server Error - OSTraining
It usually means that there's a misconfiguration of the server with the software. The message is generic and requires more investigation.
Read more >
Error message in the OHIF Viewer - Imaging Data Commons
Hi, the OHIF viewer is giving me an error message saying: “Error loading derived display set: Cannot read property ...
Read more >
Fixing the 500 Internal Server Error | OVH Guides
The “500 Internal Server Error” can affect your entire website or only parts of it. It can be permanent, appear sporadically, or result...
Read more >
WebServer - 3D Slicer documentation - Read the Docs
Creates a fairly simple but powerful web server that can respond to http(s) requests with data from the current application state or modify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found