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
binding_helper fails when "future" package is installed #24
Comments
The current code base uses a conditional import to address the different location of this function in different Python versions: python_qt_binding/src/python_qt_binding/binding_helper.py Lines 33 to 36 in c96c580
Can you please post the version number of the Or may be you have a custom |
Yes, I saw that. That conditional import approach doesn't work with Python 2.7.6. "import builtins" succeeds. But "builtins" in Python 2.7.6 doesn't have
So
at line 106 fails. As ROS sets it up, PYTHONPATH="/opt/ros/jade/lib/python2.7/dist-packages" That internal symbol isn't in Python 2.7.6. Try using the supported approach, "importlib". Thanks.
|
I am using Python 2.7.6 on Trusty and for me the following line raises an
What path does the following command output for you:
|
Here's the
pip shows "future (0.14.3)" as installed. |
Thanks for looking into your configuration. That clarifies why it didn't fail on my machine. I have created PR #25 to swap the import order for now. That worked for me - with and without the I might update the code to use |
That works. Replaced the version of binding_helper.py with the one from PR #25, and rqt_graph displays properly. See attached screenshot of it working. Thanks. I'd suggest using importlib in future. "import" is deprecated. Using importlib, you don't have to keep up with internal changes in Python. |
Thanks for confirming. |
Ubuntu 14.04 LTS / 64 bit. ROS/Gazebo Jade installed per instructions at "http://wiki.ros.org/jade/Installation/Ubuntu"
I'm working through the tutorials, in order. Everything went well until the first use of "rqt_graph" in the turtle tutorial. This produced the error:
For Python 2.7.6, that's a standard error. There is no
in Python 2.7.6. It's there in 2.7.9, and 3.x, but not 2.7.6. So, with the stock Python of Ubuntu 14.04 LTS, ROS won't work.
From the Python documentation:
It's an internal function which changes between Python releases. Using it in binding_helper created a bug. Importlib should be used instead.
See also "http://answers.ros.org/question/210762/rqt_graph-not-finding-qt4/"
The text was updated successfully, but these errors were encountered: