bowang-lab / MedSAMSlicer

3D Slicer Plugin for Segment anything in medical images
https://www.nature.com/articles/s41467-024-44824-z
148 stars 18 forks source link

slicer 3D error send image #3

Closed Pawelip closed 1 month ago

Pawelip commented 8 months ago

Hello,I would like to congratulate you on your great work! I installed the plugin at my slicer 3d, however, I have a problem during segmentation it throws me this error when try to send Image:

[FD] INFO: Started server process [15196] [FD] INFO: Waiting for application startup. [FD] INFO: Application startup complete. [FD] ERROR: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 5555): only one usage of e ach socket address (protocol/network address/port) is normally permitted [FD] INFO: Waiting for application shutdown. [FD] INFO: Application shutdown complete.

how can it be solved ?

rasakereh commented 8 months ago

Hi, thank you! It says that another application is using our plugin port. It is highly likely that so called "another application" is our plugin itself which was run before. In that case you can just ignore the error message because the other server will habdle everything.

Have you been able to do the segmentation you were looking for regardless of the error message?

AvaDanialy commented 7 months ago

I also have this problem with the latest plugin version. When I try to "send image", I encounter many errors (I'm using Mac), and it stops completely and doesn't go through. The last error for example:

File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/routing.py", line 77, in app await response(scope, receive, send) File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/responses.py", line 161, in call await self.background() File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/background.py", line 45, in call await task() File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/background.py", line 30, in call await run_in_threadpool(self.func, *self.args, *self.kwargs) File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool return await anyio.to_thread.run_sync(func, args) File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread return await future File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 851, in run result = context.run(func, *args) File "/Users/avadnly/Desktop/ReCenter_DICOMs/MedSam/server_essentials/server.py", line 200, in get_image s.bind(("", 5556)) OSError: [Errno 48] Address already in use

dieterrosch commented 6 months ago

You have something else already running on port 5555 of your PC.

rasakereh commented 5 months ago

That's an issue with MacOS process communication. Sometimes our program fails to close other instances of server it had created. I will fix it and let you know. But a temporary solution is to kill any process using 5555 and 5556 ports

rasakereh commented 3 months ago

We have released a new version majorly different from the older one to address such issues. Would you please try now with the latest released version? thanks!