Comments (6)
This is a bug with _create_notifier()
in _base_events.py
. The function defines a class
with a global
name. However, the global statement documentation says:
Names listed in a global statement must not be defined as formal parameters, or as targets in with statements or except clauses, or in a for target list, class definition, function definition, import statement, or variable annotation.
from qtinter.
Fixed in commit 37e1edb.
from qtinter.
Commit 37e1edb didn't fix the issue because the error was reproduced consistently in test runs after the commit:
tests #96: Python-3.7-PySide6-windows-latest
tests #97: Python-3.7-PySide6-windows-latest
tests #98:
Python-3.7-PySide6-windows-latest
from qtinter.
Fixed in commit ded0b23 by not using enum.Enum
under Python 3.7.
from qtinter.
Same error occurred again, still with Python 3.7 + PySide6 but on macOS:
Python-3.7-PySide6-macos-latest
from qtinter.
Added adhoc
workflow to investigate this problem. adhoc runs 2 to 8 show some interesting results.
adhoc#2 passes but adhoc#3 fails. The only difference is that adhoc#3 runs test.test_asyncio
as a prior step before running tests. It's unclear why this makes a difference.
adhoc#4 to 7 are a series of runs with increasing logging. adhoc#7 shows that when _QiNotifierObject
is first created, _QiNotifierObject.__init__
is <function _create_notifier.<locals>._QiNotifierObjectImpl.__init__ at 0x108dbf0e0>
. But when AttributeError
is raised later, _QiNotifierObject.__init__
has changed to <method-wrapper '__init__' of Shiboken.ObjectType object at 0x7f8258c9d340>
.
This change is unexpected. It might be related to two factors: (1) AttributeError
starts after a KeyboardInterrupt
test, and (2) _QiNotifierObjectImpl
is defined as a function-local class. This suggests that SIGINT
might have broken the internal state of a locally-defined QObject
-derived class.
adhoc#8 attempts a workaround of this by making _QiNotifierObject
a module-level (instead of function-local) class. To keep lazy resolution of Qt binding, a _QiObject
class is added to qtinter.bindings
.
This appears to have fixed the issue.
from qtinter.
Related Issues (18)
- Exception in __del__ for unclosed loop HOT 1
- Types missing HOT 4
- tests #43 error HOT 1
- tests #68 error HOT 2
- tests #78 error HOT 3
- System test errors HOT 4
- how to use qtiner for stdout and plainTextEdit? HOT 1
- [error] error in run Qprocess!!!! HOT 1
- @qtinter.asyncslot function can't used in @qtinter.asyncslot function??? HOT 1
- qtinter0.8 ,@qtinter.asyncslot function can't used in QMenu?? HOT 2
- delete
- some error on run_in_executor? HOT 4
- tests #187 error HOT 2
- tests #296 error HOT 2
- tests #309 error HOT 1
- RuntimeError: An instance of QCoreApplication or its derived class must be created in order to run QiBaseEventLoop
- Asyncslot eager execution and qtinter.modal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtinter.