slaclab / pysmurf

Other
2 stars 9 forks source link

Server gui crashing in new release v7.3.1 due to incompatible pydm version #768

Closed swh76 closed 1 year ago

swh76 commented 1 year ago

Describe the bug

Server gui comes up, but is blank. Get this error in the server logs:

ERROR:pydm.widgets.channel:Unable to make proper connection for <PyDMChannel (rogue://0/root)>
Traceback (most recent call last):
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/widgets/channel.py", line 139, in connect
    pydm.data_plugins.establish_connection(self)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 66, in establish_connection
    establish_connection_immediately(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 71, in establish_connection_immediately
    plugin.add_connection(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/plugin.py", line 311, in add_connection
    self.connections[connection_id] = self.connection_class(
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 73, in __init__
    self._host, self._port, self._path, self._mode = parseAddress(address)
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 54, in parseAddress
    path = data[1]
IndexError: list index out of range
ERROR:pydm.widgets.channel:Unable to make proper connection for <PyDMChannel (rogue://0/root)>
Traceback (most recent call last):
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/widgets/channel.py", line 139, in connect
    pydm.data_plugins.establish_connection(self)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 66, in establish_connection
    establish_connection_immediately(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 71, in establish_connection_immediately
    plugin.add_connection(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/plugin.py", line 311, in add_connection
    self.connections[connection_id] = self.connection_class(
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 73, in __init__
    self._host, self._port, self._path, self._mode = parseAddress(address)
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 54, in parseAddress
    path = data[1]
IndexError: list index out of range
ERROR:pydm.widgets.channel:Unable to make proper connection for <PyDMChannel (rogue://0/root)>
Traceback (most recent call last):
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/widgets/channel.py", line 139, in connect
    pydm.data_plugins.establish_connection(self)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 66, in establish_connection
    establish_connection_immediately(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/__init__.py", line 71, in establish_connection_immediately
    plugin.add_connection(channel)
  File "/home/cryo/.local/lib/python3.8/site-packages/pydm/data_plugins/plugin.py", line 311, in add_connection
    self.connections[connection_id] = self.connection_class(
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 73, in __init__
    self._host, self._port, self._path, self._mode = parseAddress(address)
  File "/usr/local/src/rogue/python/pyrogue/pydm/data_plugins/rogue_plugin.py", line 54, in parseAddress
    path = data[1]
IndexError: list index out of range

Also seeing this unrelated warning:

/usr/local/lib/python3.8/dist-packages/pyqtgraph/colors/palette.py:1: RuntimeWarning: PyQtGraph supports Qt version >= 5.15, but 5.12.8 detected.

The latter can be resolved by installing pyqt5 version 5.15 in the server docker before starting the server.

pip install pyqt5==5.15
swh76 commented 1 year ago

Running dev version of the server docker, found the problem starts for pydm versions >= 1.19.0. Tested by entering the server dev docker and tried different pydm versions like this;

pip install pydm==1.19.0
/usr/local/src/pysmurf/server_scripts/cmb_eth.py -g -w smurf_scrowaveMuxBpEthGen2_v1.1.1.zip -d /tmp/fw/smurf_cfg/defaults/defaults_c03_lb_lb.yml --enable-em22xx

running on an SO production system. The latest pydm release that works is 1.18.2. It's not obvious to me from the pydm v1.19.0 release notes.

swh76 commented 1 year ago

Let's try to fix this by specifying these working versions in https://github.com/slaclab/smurf-rogue-docker/blob/R2.9.0/Dockerfile and bumping the smurf-rogue-docker release to R2.9.1.

swh76 commented 1 year ago

Started issue for this in the smurf-rogue-docker repo here - https://github.com/slaclab/smurf-rogue-docker/issues/27.