-
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
Error when re-arranging widgets over plot. Kinetic, 16.04 #35
Comments
If I don't got over the plot widget, and drop it in place, I get:
|
I have the same problem running rqt_gui on Ubuntu 16.04.
I tried |
@vmatos @RYO0115 Can you please try the proposed fix from ros-visualization/qt_gui_core#76 and confirm if it fixes the problem for you. If there are problems remaining can you please describe the exact steps how to reproduce it. |
My procedure:
Then I verified the error was reproducible:
Then I tested the fix:
@dirk-thomas My test indicates this PR fixes my first issue: |
I was able to reproduce the first error easily. The PR fixes (also for you) which is good. But I never saw the second error. What are the steps to reproduce the second one? |
To reproduce the 2nd error:
|
I can reproduce the second error with these steps. Unfortunately the error is within |
Refer to https://github.com/ros-visualization/rqt/issues/110 Basically its getting bad resize events when two matplotlib canvas exist at the same time. So now every time a tab switch is changed it destroys one if it existed and creates a new one if needed.
It appears this issue is still existing. Since that report was submitted, matplotlib has gone through several major version changes, of which they claim changes should have been pushed. However, creating two rqt_plot windows and attempting to align one on top of the other still results in the following stack trace on Kinetic and Melodic:
rqt still utilizes Python 2, and the newest version of matplotlib compatible is 3.0.3. Version 3.1.1 is also available for Python3. The issue appears to still exist upstream, at least in Python2. |
It appears that my issue was the use of an old version of matplotlib, 1.5.1. Completing the reproduction steps now produces the following stack trace:
Reproduction steps:
|
If the problem has been resolved upstream in a Python 3-only release the easiest is probably to wait for ROS Noetic (May 2020) which will target Python 3. If the problem is still present in the latest code (which is Python 3) it is probably best to report this problem upstream. |
@dirk-thomas, please see my newest comment. The issue does not appear if you are using the latest Python2 version of matplotlib (2.2.4). Instead, a second issue, a |
I read that comment. My feedback still applies to that different error message since I don't see what could be done in this repository. |
So is there any workthrough for this issue for now? |
I believe the consensus was that we won't get an upstream fix for this and
we will have to wait until Ros switches to Python 3 (I hate that Python 2
is still widely used, it's been a decade already!).
…On Sun, Feb 16, 2020, 03:45 DanielChen ***@***.***> wrote:
So is there any workthrough for this issue for now?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35?email_source=notifications&email_token=ABDLVRTF2PKL2Y6AAXAXWMLRDD4LBA5CNFSM4IPC6SZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL4A64Y#issuecomment-586682227>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDLVRWQXWSZHOAHWYNNLEDRDD4LBANCNFSM4IPC6SZA>
.
|
Hi there, I came across this error myself and I did a bit of digging.
More specifically, i've encountered this issue with a particular rqt perspective configuration and matplotlib version
A quickfix to this issue would be something like the following on the try:
self.figure.tight_layout()
except ValueError:
pass |
@bergercookie Please consider to create a pull request for the proposed workaround. |
Matplotlib emits errors like the following under specific canvas layouts: ```console Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent self.figure.tight_layout() File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1756, in tight_layout self.subplots_adjust(**kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1612, in subplots_adjust self.subplotpars.update(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 230, in update raise ValueError('bottom cannot be >= top') ValueError: bottom cannot be >= top ``` Current patch catches and suppresses that exception. References: - matplotlib/matplotlib#10915 - ros-visualization#35
Matplotlib emits errors like the following under specific canvas layouts: ```console Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent self.figure.tight_layout() File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1756, in tight_layout self.subplots_adjust(**kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1612, in subplots_adjust self.subplotpars.update(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 230, in update raise ValueError('bottom cannot be >= top') ValueError: bottom cannot be >= top ``` Current patch catches and suppresses that exception. References: - matplotlib/matplotlib#10915 - ros-visualization#35
* Fix #35 - "bottom cannot be >= top" matplotlib error Matplotlib emits errors like the following under specific canvas layouts: ```console Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent self.figure.tight_layout() File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1756, in tight_layout self.subplots_adjust(**kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1612, in subplots_adjust self.subplotpars.update(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 230, in update raise ValueError('bottom cannot be >= top') ValueError: bottom cannot be >= top ``` Current patch catches and suppresses that exception. References: - matplotlib/matplotlib#10915 - #35 * renamed to `safe_tight_layout`, inverted logic to avoid duplicating the call Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@bergercookie Yes, it was because of matplotlib version issues, I resolved by upgrading to 2.2.5. Thanks |
To bump this further, I encountered this issue and fixed by upgrading sudo pip install --upgrade matplotlib |
…ib error (ros-visualization#52)" This reverts commit cb7d874.
That's a cleaner way to resolve ros-visualization#35 and ros-visualization#54.
That's a cleaner way to resolve ros-visualization#35 and ros-visualization#54.
When I try to re-arrange widgets in rqt, whenever I pass with it over a plot widget, I get the error:
The text was updated successfully, but these errors were encountered: