-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix linux clipboard QApplication() creation #14815
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
Conversation
Fixes pandas-dev#14372 A Qt application cannot instantiate multiple `QApplication` instances, so we create a new `QApplication` only when the global `QApplication.instance()` is None. Failing sample: ``` from PyQt4.QtGui import QApplication myapp = QApplication([]) from pandas.util.clipboard import clipboard_get # <--- ERROR File "prefix/lib/python2.7/site-packages/pandas/util/clipboard.py", line 164, in <module> app = qt4.QtGui.QApplication([]) RuntimeError: A QApplication instance already exists. ```
this should be addressed upstream pls file a report with pyoerclip |
Current coverage is 85.27% (diff: 0.00%)@@ master #14815 diff @@
==========================================
Files 144 144
Lines 50968 50968
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 43466 43465 -1
- Misses 7502 7503 +1
Partials 0 0
|
can you add a whatsnew note (0.20.0) |
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.
minor comments, but can you please file a bug report upstream and link here as well.
@@ -50,7 +50,7 @@ def init_qt_clipboard(): | |||
# $DISPLAY should exist | |||
from PyQt4.QtGui import QApplication | |||
|
|||
app = QApplication([]) |
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.
can you add a comment here
thanks! |
closes pandas-dev#14372 A Qt application cannot instantiate multiple `QApplication` instances, so we create a new `QApplication` only when the global `QApplication.instance()` is None. Author: Pankaj Pandey <[email protected]> Closes pandas-dev#14815 from pankajp/patch-2 and squashes the following commits: 40d70f9 [Pankaj Pandey] BUG: Fix linux clipboard QApplication() creation
closes pandas-dev#14372 A Qt application cannot instantiate multiple `QApplication` instances, so we create a new `QApplication` only when the global `QApplication.instance()` is None. Author: Pankaj Pandey <[email protected]> Closes pandas-dev#14815 from pankajp/patch-2 and squashes the following commits: 40d70f9 [Pankaj Pandey] BUG: Fix linux clipboard QApplication() creation
A Qt application cannot instantiate multiple
QApplication
instances,so we create a new
QApplication
only when the globalQApplication.instance()
is None.Failing sample (gtk should not be installed for pandas to use qt clipboard):