Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting perspectives fails with QColor setting #271

Open
Kettenhoax opened this issue Jan 13, 2023 · 0 comments
Open

Exporting perspectives fails with QColor setting #271

Kettenhoax opened this issue Jan 13, 2023 · 0 comments

Comments

@Kettenhoax
Copy link

In ROS humble, when exporting the current perspective via the rqt GUI, while a plugin is instanced that saves a QColor setting, the export fails.

Traceback (most recent call last):
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 188, in save_settings_completed
    callback(*callback_args)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 399, in _on_export_perspective_continued
    self._convert_values(data, self._export_value)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 420, in _convert_values
    keys[key] = convert_function(keys[key])
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 463, in _export_value
    reimported = self._import_value(data)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 428, in _import_value
    return eval(value['repr'])
  File "<string>", line 1
    <PyQt5.QtGui.QColor object at 0x7f238b461540>
    ^
SyntaxError: invalid syntax

I created a minimal plugin example, that when loaded in rqt can reproduce the issue: https://gist.github.com/Kettenhoax/5e83c83ba2f8887e4fe8da121bd8b367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant