shenghaoyang / pylcddc

Python LCDd client (LCDproc server client)
MIT License
9 stars 4 forks source link

examples don't work #2

Closed ghost closed 3 years ago

ghost commented 4 years ago

Running either example gives:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/pylcddc/iothread.py", line 242, in response_nonblock raise RuntimeError('I/O thread terminated') RuntimeError: I/O thread terminated

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/pylcddc/iothread.py", line 153, in request_multiple reply = self.response_nonblock() File "/usr/local/lib/python3.8/dist-packages/pylcddc/iothread.py", line 244, in response_nonblock raise exceptions.FatalError(e) pylcddc.exceptions.FatalError: I/O thread terminated

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/pylcddc/client.py", line 85, in init resp = self._request( File "/usr/local/lib/python3.8/dist-packages/pylcddc/client.py", line 157, in _request return self._request_multiple((msg,), timeout)[0] File "/usr/local/lib/python3.8/dist-packages/pylcddc/client.py", line 176, in _request_multiple return self._iothread.request_multiple(msgs, timeout) File "/usr/local/lib/python3.8/dist-packages/pylcddc/iothread.py", line 160, in request_multiple raise exceptions.FatalError(e) pylcddc.exceptions.FatalError: I/O thread terminated

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "../test.py", line 21, in c = client.Client('localhost', 13666) File "/usr/local/lib/python3.8/dist-packages/pylcddc/client.py", line 90, in init raise exceptions.FatalError(e) pylcddc.exceptions.FatalError: I/O thread terminated

Yes, LCDd is running.

shenghaoyang commented 4 years ago

Hello,

"/usr/local/lib/python3.8/dist-packages/pylcddc/iothread.py"

Could you elaborate more on what type of operating system you are using? I gave the simple example a try against LCDd 0.5.9 with the curses driver and everything seems to be working fine.

Also, the exception that led to the thread's termination should have been assigned to c._iothread._thread_death_exception. Could you peek into that and tell us what it contains?

If you are not using a Linux distribution, I suspect the cause of the error is the SOCK_SEQPACKET socket type not being available on the platform that you have. As far as I know, that is Linux-specific unless additional software is installed.

If you confirm that, I could look into ways to replace the dependency on SOCK_SEQPACKET semantics - I wasn't expecting anyone to use this on anything but Linux platforms.

Thanks.

Shenghao