Comments (3)
Additional information: The issue only occurs on Wayland. Running the problematic example on X11 works.
As a workaround, you can force Qt to use X11 instead of Wayland:
export QT_QPA_PLATFORM=xcb
python app.py
from pyvistaqt.
I did a little research around stackoverflow and one answer mentioned that it could happen when the window id passed is not correct, which can be found here:
https://stackoverflow.com/questions/34704542/in-linux-get-window-class-raise-x-error-of-failed-request-badwindow-invalid
I don't know if it would be helpful
from pyvistaqt.
Hi there,
I get the exact same error output. I'm working with virtualenv. I tried with pyqt5, pyqt6, pyside6 (using os.environ["QT_API"]
) and get the same error as soon as the BackgroundPlotter
is instantiated.
I did several tests to understand if the issue is related to pyqt/pyside or qtpy or pyvista or pyvistaqt:
- Using directly pyqt/pyside works.
- Using directly qtpy works.
- Using pyvista works.
- It seems that only pyvistaqt produces this error.
Here is an example that works. But if I uncomment QtInteractor
or BackgroundPlotter
lines I get the same error message.
import os
os.environ["QT_API"] = "pyside6"
from qtpy.QtWidgets import *
from pyvistaqt import QtInteractor, BackgroundPlotter
class MainWindow(QDialog):
def __init__(self, parent=None):
QDialog.__init__(self, parent)
self.frame = QFrame()
vlayout = QVBoxLayout()
self.frame.setLayout(vlayout)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
# Produces X error: BadWindow
#plotter = BackgroundPlotter(False, app=app)
win = MainWindow()
# Produces X error: BadWindow
#interactor = QtInteractor(win)
win.show()
sys.exit(app.exec())
I wonder if it's related to my Qt installation, or Wayland. My config:
- Ubuntu 22.04.3
- GNOME 42.9
- Wayland
from pyvistaqt.
Related Issues (20)
- Segmentation fault on Mac with PyQt5 HOT 2
- Race condition: BackgroundPlotter has no attribute named image HOT 3
- Running pyvistaqt project in Github Action HOT 2
- Inconsistent plotting results with PyVistaQT versus Jupyter (Trame) backends HOT 3
- Issue using pyvistaqt QtInteractor on Windows 10
- MAINT: Deploy docs HOT 7
- solicitud para agregar característica, para guardar los modelos en formato obj
- Stage release for PyVista 0.40 HOT 3
- Update GC testing fixture
- MAINT: Remove Azure
- Make the canvas background transparent HOT 1
- Border glitch during resize HOT 6
- macOS `pvqt.BackgroundPlotter` never opens window HOT 2
- DOC: MultiPlotter vs BackgroundPlotter
- no mouse interactivity with BackgroundPlotter HOT 1
- Consider adding `.git_archival.txt` to include version number in git archive
- QtInteractor CPU usage is based on window size and meshes rendered HOT 1
- circular import
- Not compatible with PySide 6.7 HOT 6
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 pyvistaqt.