Hello, would this be the right place to post this?
I am trying to run a python script that communicates with a 3d slicer extension using the pyigtl library.
However, I am struggling to get the script to communicate with slicer. which is outside the container.
The docker Image is the python:3.10-slim-bullseye, but the same errors occur with the nvidia/cuda:12.3.0-base-ubuntu22.04 image.
Basically, the script runs :
text_server = pyigtl.OpenIGTLinkServer(port=18945, local_server=True)
the code will stall on the next part:
string_message = pyigtl.StringMessage(f, device_name="TextMessage")
text_server.send_message(string_message)
Attempting to set local server to false like so:
text_server = pyigtl.OpenIGTLinkServer(port=18945, local_server=False, iface="0.0.0.0".encode('utf-8'))
reuslts in this error:
Traceback (most recent call last):
File "/app/server/server.py", line 174, in <module>
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
File "/app/server/server.py", line 170, in main
await tmsserver.run_server()
File "/app/server/server.py", line 43, in run_server
servertms = pyigtl.OpenIGTLinkServer(port=18944, local_server=False, iface="0.0.0.0".encode('utf-8'))
File "/usr/local/lib/python3.10/dist-packages/pyigtl/comm.py", line 178, in __init__
self.host = socket.inet_ntoa(fcntl.ioctl(soc.fileno(), 0x8915, struct.pack('256s', ifname[:15]))[20:24])
struct.error: argument for 's' must be a bytes object
the same error occurs if the iface var is set to wifi0 and wlan0 and eth0 stalls like the local version
For added context the script is SlicerTMS/server/server.py in the SlicerTMS github page