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

pyqtgraph < 0.10 fail to run from pyqtgraph import __version__ , us… #13

Merged
merged 2 commits into from
Jul 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/rqt_plot/data_plot/pyqtgraph_data_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
def parse_version(s):
return [int(x) for x in re.sub(r'(\.0+)*$', '', s).split('.')]

from pyqtgraph import __version__ as pyqtgraph_version
try:
from pyqtgraph import __version__ as pyqtgraph_version
except RuntimeError:
# pyqtgraph < 1.0 using Qt4 failing on 16.04 because kinetic uses Qt5.
# This raises RuntimeError('the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class')
import pkg_resources
pyqtgraph_version = pkg_resources.get_distribution("pyqtgraph").version

if parse_version(pyqtgraph_version) < parse_version('0.10.0'):
raise ImportError('A newer PyQtGraph version is required (at least 0.10 for Qt 5)')

Expand Down