Skip to content

BUG: Fix linux Qt clipboard QApplication() creation #14371

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

Closed
wants to merge 1 commit into from

Conversation

pankajp
Copy link
Contributor

@pankajp pankajp commented Oct 7, 2016

Fixes #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.

A Qt application cannot instantiate multiple `QApplication` instances,
so we create a new `QApplication` only when the global
`QApplication.instance()` is None.
@codecov-io
Copy link

codecov-io commented Oct 7, 2016

Current coverage is 85.26% (diff: 100%)

Merging #14371 into master will decrease coverage by <.01%

@@             master     #14371   diff @@
==========================================
  Files           140        140          
  Lines         50632      50632          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43171      43170     -1   
- Misses         7461       7462     +1   
  Partials          0          0          

Powered by Codecov. Last update ee374ee...09eb695

@jreback
Copy link
Contributor

jreback commented Oct 7, 2016

I don't think any of our clipboard tests actually work on travis, xref #9693

ideally we can resolve this first.

@jreback jreback added the IO Data IO issues that don't fit into a more specific label label Oct 7, 2016
@jreback
Copy link
Contributor

jreback commented Dec 6, 2016

our pyperclip has been added quite subtantially in master, so pls re-tests and re-open if needed.

@jreback jreback closed this Dec 6, 2016
@pankajp
Copy link
Contributor Author

pankajp commented Dec 7, 2016

Reopened on changed file as #14815

@pankajp pankajp deleted the patch-1 branch December 7, 2016 06:24
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG : Check for and Use QApplication instance : clipboard
4 participants