PyQt Error XcbConnection: Failed to initialize XRandr on Ubuntu
Asked Answered
B

0

7

I am developing a GUI using PyQt5 on a server with Ubuntu 14.04 via VNC. After I run the following command:

import sys
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)

I always get the following error message:

QXcbConnection: Failed to initialize XRandr

Besides, whenever I select a file in a file dialog created by PyQt5, the file dialog will disappear immediately and anther error message appears:

QXcbConnection: XCB error: 3 (BadWindow), sequence: 449, resource id: 30428093, major code: 40 (TranslateCoords), minor code: 0

I have been searching about this error a lot but didn't find anything helpful yet. Any idea on this?

Bensen answered 18/1, 2018 at 21:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.