jath03 / openrgb-python

A python client for the OpenRGB SDK
GNU General Public License v3.0
115 stars 22 forks source link

OpenRGBClient hangs on Connection #16

Closed CDNievas closed 3 years ago

CDNievas commented 3 years ago

The code when is exectued on a Raspberry Pi 3 (Python 3.7.3) hangs out in the lock acquire() The client is connected to the server because it appears on the list of the OpenRGB program...

But when I execute it on another PC with Linux Mint (Python 3.8.5) it works normally... so IDK

Please help! Thx

Traceback (most recent call last):
  File "app.py", line 24, in <module>
    OpenRGB.connect(IP_OPENRGB,PORT_OPENRGB)
  File "/home/pi/Desktop/deploys/leds-twitch/OpenRGB.py", line 9, in connect
    client = OpenRGBClient(ip, port, '')
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/orgb.py", line 235, in __init__
    self.comms.requestDeviceNum()
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/network.py", line 163, in requestDeviceNum
    self.read()
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/network.py", line 113, in read
    self.callback(device_id, packet_type, buff[0])
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/orgb.py", line 248, in _callback
    self.comms.requestDeviceData(x)
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/network.py", line 154, in requestDeviceData
    self.send_header(device, utils.PacketType.REQUEST_CONTROLLER_DATA, struct.calcsize('I'))
  File "/home/pi/.local/lib/python3.7/site-packages/openrgb/network.py", line 176, in send_header
    self.lock.acquire()
  File "/home/pi/.local/lib/python3.7/site-packages/engineio/client.py", line 39, in signal_handler
    return original_signal_handler(sig, frame)
  File "/home/pi/.local/lib/python3.7/site-packages/socketio/client.py", line 26, in signal_handler
    return original_signal_handler(sig, frame)
jath03 commented 3 years ago

What openrgb-python version is on the pi? I'm pretty sure this is a problem that I fixed in v0.2.4. If not and you have the newest version, can you show the code that produced the error?

CDNievas commented 3 years ago

openrgb-python: 0.2.5

image

https://github.com/CDNievas/leds-twitch/blob/main/OpenRGB.py And the code is here. Thanks!

jath03 commented 3 years ago

Is the server crashing or the connecting getting interrupted? Unless something is really broken here, the client is just waiting on a response from the server and not getting one.

CDNievas commented 3 years ago

I'll check and tell you

CDNievas commented 3 years ago

Well I tried again installing directly the last version uploaded to this repository but it didnt work... same error, the client connects to the server but it hangs...

image

Tried also using another port, and disabling the windows firewall

CDNievas commented 3 years ago

Missclick sry

CDNievas commented 3 years ago

I'll try running it with docker and another Python version

jath03 commented 3 years ago

Updating to v0.2.6 should fix this issue. Lmk how it goes.

CDNievas commented 3 years ago

I'll try thx!