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

bug in exception handling #127

Closed
den-run-ai opened this issue Jan 31, 2016 · 1 comment
Closed

bug in exception handling #127

den-run-ai opened this issue Jan 31, 2016 · 1 comment
Labels
Milestone

Comments

@den-run-ai
Copy link
Contributor

den-run-ai commented Jan 31, 2016

From: https://mail.python.org/pipermail/pythondotnet/2015-August/001678.html

I may have found a bug in how the clr package converts .net exceptions to Python exceptions, at least as it relates to PyQt. If I try and add a library which does not exist, and then try and print the exception, PyQt is
subsequently unable to initialize OLE. This means that PyQt applications cannot use copy/paste and drag-and-drop.

Here is a minimal example:

import clr
import sys
from PyQt4 import QtGui

try:
    clr.AddReference('foo') #This doesn't exist
except Exception as e:
    print e
app = QtGui.QApplication(sys.argv)
app.exec_()

This results in the Qt error:

Qt: Could not initialize OLE (error 80010106)

The program runs, but copy/paste and drag-and-drop fails. If I do not try and print the exception (replace the except block with 'pass'), the program runs without any problems. Also, if the library exists I have no problems.

@den-run-ai
Copy link
Contributor Author

see #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants