-
Notifications
You must be signed in to change notification settings - Fork 42
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
pyqtgraph < 0.10 fail to run from pyqtgraph import __version__
, us…
#13
Conversation
…e pkg_resources ``` $ rqt_plot /joint_state/position[0] Traceback (most recent call last): File "/opt/ros/kinetic/bin/rqt_plot", line 6, in <module> from rqt_plot.plot import Plot File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/plot.py", line 43, in <module> from .data_plot import DataPlot File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/__init__.py", line 44, in <module> from .pyqtgraph_data_plot import PyQtGraphDataPlot File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/pyqtgraph_data_plot.py", line 46, in <module> from pyqtgraph import __version__ as pyqtgraph_version File "/usr/lib/python2.7/dist-packages/pyqtgraph/__init__.py", line 13, in <module> from .Qt import QtGui File "/usr/lib/python2.7/dist-packages/pyqtgraph/Qt.py", line 104, in <module> from PyQt4 import QtGui, QtCore, uic RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class ```
The I am not sure what this patch should achieve - especially since the version comparion is left untouched which raises a RuntimeError for that version of |
file and that includes
which raises error
as seen in error message. This PR catch this exception and try with other method, using
would be ok. |
from pyqtgraph import __version__ as pyqtgraph_version | ||
try: | ||
from pyqtgraph import __version__ as pyqtgraph_version | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please catch a specific exception type here as well as add a comment when it is expected to be raised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dirk-thomas sorry for late, updated to catch only "RuntimeError"
Thank you for the patch and the update. |
…e pkg_resources
@dirk-thomas 's fix at ros-visualization/rqt_common_plugins#415 failing on default kinetic enviroment whcih uses 0.9.10 of python-pyqtgraph https://packages.ubuntu.com/xenial/python-pyqtgraph