PyQT5 program returning error only during first compile run
The following example, when run in a new ipython console (spyder) returns "-1", but only at the first try. After that it seems to work fine.
from PyQt5 import QtWidgets, QtGui, QtCore
from GUI import Ui_MainWindow # importing our generated file
import sys
import numpy as np
class mywindow(QtWidgets.QMainWindow):
def __init__(self):
super(mywindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
app = QtCore.QCoreApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
application = mywindow()
application.show()
sys.exit(app.exec())
The error is as follows:
>runfile('C:/Users/xxx.py', wdir='C:/Users/xx/Documents/3dPackaging')
An exception has occurred, use %tb to see the full traceback.
SystemExit: -1
C:UsersxxDocumentsAnacondalibsite-packagesIPythoncoreinteractiveshell.py:2969: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
%tb
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/xxx.py', wdir='C:/Users/xx')
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/xx/Documents/3dPackaging/VersandkartonsPacken.py", line 64, in
sys.exit(app.exec())
SystemExit: -1
I have no idea what this could be, but as this is supposed to be a standalone program one day, I'm afraid it might be messy then, so i'd rather fix it. Anything I should try?
It's not reproducible without the GUI.py, so here it is:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1127, 910)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.pushButton_schliessen = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_schliessen.setGeometry(QtCore.QRect(930, 770, 75, 23))
self.pushButton_schliessen.setObjectName("pushButton_schliessen")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(440, 20, 421, 31))
font = QtGui.QFont()
font.setPointSize(20)
self.label.setFont(font)
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(170, 770, 75, 23))
self.pushButton.setObjectName("pushButton")
self.tableWidget_input = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_input.setGeometry(QtCore.QRect(160, 80, 421, 671))
self.tableWidget_input.setObjectName("tableWidget_input")
self.tableWidget_input.setColumnCount(0)
self.tableWidget_input.setRowCount(0)
self.tableWidget_output = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_output.setGeometry(QtCore.QRect(650, 80, 441, 671))
self.tableWidget_output.setObjectName("tableWidget_output")
self.tableWidget_output.setColumnCount(0)
self.tableWidget_output.setRowCount(0)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1127, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.pushButton_schliessen.setText(_translate("MainWindow", "Schliessen"))
self.label.setText(_translate("MainWindow", "Versandkartons Packen"))
self.pushButton.setText(_translate("MainWindow", "Berechnen"))
It seems to be related to this, app is never none but already returns a QCoreApplication in the first run. However , moving it into a function doesn't work. And I can't reproduce in the console the behaviour that actually makes it work in the second run. Something seems to change the QCorEApplication into a working one.
In two now deleted answers (didn't work), it was suggested to use if __name__ == '__main__':
and move the application call into a new class. That hasn't worked.
python compiler-errors pyqt5 spyder
|
show 5 more comments
The following example, when run in a new ipython console (spyder) returns "-1", but only at the first try. After that it seems to work fine.
from PyQt5 import QtWidgets, QtGui, QtCore
from GUI import Ui_MainWindow # importing our generated file
import sys
import numpy as np
class mywindow(QtWidgets.QMainWindow):
def __init__(self):
super(mywindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
app = QtCore.QCoreApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
application = mywindow()
application.show()
sys.exit(app.exec())
The error is as follows:
>runfile('C:/Users/xxx.py', wdir='C:/Users/xx/Documents/3dPackaging')
An exception has occurred, use %tb to see the full traceback.
SystemExit: -1
C:UsersxxDocumentsAnacondalibsite-packagesIPythoncoreinteractiveshell.py:2969: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
%tb
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/xxx.py', wdir='C:/Users/xx')
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/xx/Documents/3dPackaging/VersandkartonsPacken.py", line 64, in
sys.exit(app.exec())
SystemExit: -1
I have no idea what this could be, but as this is supposed to be a standalone program one day, I'm afraid it might be messy then, so i'd rather fix it. Anything I should try?
It's not reproducible without the GUI.py, so here it is:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1127, 910)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.pushButton_schliessen = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_schliessen.setGeometry(QtCore.QRect(930, 770, 75, 23))
self.pushButton_schliessen.setObjectName("pushButton_schliessen")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(440, 20, 421, 31))
font = QtGui.QFont()
font.setPointSize(20)
self.label.setFont(font)
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(170, 770, 75, 23))
self.pushButton.setObjectName("pushButton")
self.tableWidget_input = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_input.setGeometry(QtCore.QRect(160, 80, 421, 671))
self.tableWidget_input.setObjectName("tableWidget_input")
self.tableWidget_input.setColumnCount(0)
self.tableWidget_input.setRowCount(0)
self.tableWidget_output = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_output.setGeometry(QtCore.QRect(650, 80, 441, 671))
self.tableWidget_output.setObjectName("tableWidget_output")
self.tableWidget_output.setColumnCount(0)
self.tableWidget_output.setRowCount(0)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1127, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.pushButton_schliessen.setText(_translate("MainWindow", "Schliessen"))
self.label.setText(_translate("MainWindow", "Versandkartons Packen"))
self.pushButton.setText(_translate("MainWindow", "Berechnen"))
It seems to be related to this, app is never none but already returns a QCoreApplication in the first run. However , moving it into a function doesn't work. And I can't reproduce in the console the behaviour that actually makes it work in the second run. Something seems to change the QCorEApplication into a working one.
In two now deleted answers (didn't work), it was suggested to use if __name__ == '__main__':
and move the application call into a new class. That hasn't worked.
python compiler-errors pyqt5 spyder
2
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
1
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37
|
show 5 more comments
The following example, when run in a new ipython console (spyder) returns "-1", but only at the first try. After that it seems to work fine.
from PyQt5 import QtWidgets, QtGui, QtCore
from GUI import Ui_MainWindow # importing our generated file
import sys
import numpy as np
class mywindow(QtWidgets.QMainWindow):
def __init__(self):
super(mywindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
app = QtCore.QCoreApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
application = mywindow()
application.show()
sys.exit(app.exec())
The error is as follows:
>runfile('C:/Users/xxx.py', wdir='C:/Users/xx/Documents/3dPackaging')
An exception has occurred, use %tb to see the full traceback.
SystemExit: -1
C:UsersxxDocumentsAnacondalibsite-packagesIPythoncoreinteractiveshell.py:2969: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
%tb
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/xxx.py', wdir='C:/Users/xx')
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/xx/Documents/3dPackaging/VersandkartonsPacken.py", line 64, in
sys.exit(app.exec())
SystemExit: -1
I have no idea what this could be, but as this is supposed to be a standalone program one day, I'm afraid it might be messy then, so i'd rather fix it. Anything I should try?
It's not reproducible without the GUI.py, so here it is:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1127, 910)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.pushButton_schliessen = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_schliessen.setGeometry(QtCore.QRect(930, 770, 75, 23))
self.pushButton_schliessen.setObjectName("pushButton_schliessen")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(440, 20, 421, 31))
font = QtGui.QFont()
font.setPointSize(20)
self.label.setFont(font)
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(170, 770, 75, 23))
self.pushButton.setObjectName("pushButton")
self.tableWidget_input = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_input.setGeometry(QtCore.QRect(160, 80, 421, 671))
self.tableWidget_input.setObjectName("tableWidget_input")
self.tableWidget_input.setColumnCount(0)
self.tableWidget_input.setRowCount(0)
self.tableWidget_output = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_output.setGeometry(QtCore.QRect(650, 80, 441, 671))
self.tableWidget_output.setObjectName("tableWidget_output")
self.tableWidget_output.setColumnCount(0)
self.tableWidget_output.setRowCount(0)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1127, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.pushButton_schliessen.setText(_translate("MainWindow", "Schliessen"))
self.label.setText(_translate("MainWindow", "Versandkartons Packen"))
self.pushButton.setText(_translate("MainWindow", "Berechnen"))
It seems to be related to this, app is never none but already returns a QCoreApplication in the first run. However , moving it into a function doesn't work. And I can't reproduce in the console the behaviour that actually makes it work in the second run. Something seems to change the QCorEApplication into a working one.
In two now deleted answers (didn't work), it was suggested to use if __name__ == '__main__':
and move the application call into a new class. That hasn't worked.
python compiler-errors pyqt5 spyder
The following example, when run in a new ipython console (spyder) returns "-1", but only at the first try. After that it seems to work fine.
from PyQt5 import QtWidgets, QtGui, QtCore
from GUI import Ui_MainWindow # importing our generated file
import sys
import numpy as np
class mywindow(QtWidgets.QMainWindow):
def __init__(self):
super(mywindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
app = QtCore.QCoreApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
application = mywindow()
application.show()
sys.exit(app.exec())
The error is as follows:
>runfile('C:/Users/xxx.py', wdir='C:/Users/xx/Documents/3dPackaging')
An exception has occurred, use %tb to see the full traceback.
SystemExit: -1
C:UsersxxDocumentsAnacondalibsite-packagesIPythoncoreinteractiveshell.py:2969: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
%tb
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/xxx.py', wdir='C:/Users/xx')
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 668, in runfile
execfile(filename, namespace)
File "C:UsersxxDocumentsAnacondalibsite-packagesspyder_kernelscustomizespydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/xx/Documents/3dPackaging/VersandkartonsPacken.py", line 64, in
sys.exit(app.exec())
SystemExit: -1
I have no idea what this could be, but as this is supposed to be a standalone program one day, I'm afraid it might be messy then, so i'd rather fix it. Anything I should try?
It's not reproducible without the GUI.py, so here it is:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1127, 910)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.pushButton_schliessen = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_schliessen.setGeometry(QtCore.QRect(930, 770, 75, 23))
self.pushButton_schliessen.setObjectName("pushButton_schliessen")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(440, 20, 421, 31))
font = QtGui.QFont()
font.setPointSize(20)
self.label.setFont(font)
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(170, 770, 75, 23))
self.pushButton.setObjectName("pushButton")
self.tableWidget_input = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_input.setGeometry(QtCore.QRect(160, 80, 421, 671))
self.tableWidget_input.setObjectName("tableWidget_input")
self.tableWidget_input.setColumnCount(0)
self.tableWidget_input.setRowCount(0)
self.tableWidget_output = QtWidgets.QTableWidget(self.centralwidget)
self.tableWidget_output.setGeometry(QtCore.QRect(650, 80, 441, 671))
self.tableWidget_output.setObjectName("tableWidget_output")
self.tableWidget_output.setColumnCount(0)
self.tableWidget_output.setRowCount(0)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1127, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.pushButton_schliessen.setText(_translate("MainWindow", "Schliessen"))
self.label.setText(_translate("MainWindow", "Versandkartons Packen"))
self.pushButton.setText(_translate("MainWindow", "Berechnen"))
It seems to be related to this, app is never none but already returns a QCoreApplication in the first run. However , moving it into a function doesn't work. And I can't reproduce in the console the behaviour that actually makes it work in the second run. Something seems to change the QCorEApplication into a working one.
In two now deleted answers (didn't work), it was suggested to use if __name__ == '__main__':
and move the application call into a new class. That hasn't worked.
python compiler-errors pyqt5 spyder
python compiler-errors pyqt5 spyder
edited Nov 16 '18 at 10:44
DonQuiKong
asked Nov 14 '18 at 7:19
DonQuiKongDonQuiKong
205112
205112
2
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
1
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37
|
show 5 more comments
2
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
1
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37
2
2
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
1
1
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37
|
show 5 more comments
2 Answers
2
active
oldest
votes
This must be related to a peculiarity of the local system. We (commenters on the original question) have not been able to reproduce the error when installing the requirements from scratch in a clean environment (even when the environment very closely matches the affected system).
Please try reinstalling your environment, or running this on a different system, and see if the problem persists.
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
|
show 2 more comments
I use conda which might be related to the issue. I just upgraded PyQT5 with pip install PyQt5
, making this issue disappear. So that seems to be the easiest solution.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294954%2fpyqt5-program-returning-error-only-during-first-compile-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This must be related to a peculiarity of the local system. We (commenters on the original question) have not been able to reproduce the error when installing the requirements from scratch in a clean environment (even when the environment very closely matches the affected system).
Please try reinstalling your environment, or running this on a different system, and see if the problem persists.
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
|
show 2 more comments
This must be related to a peculiarity of the local system. We (commenters on the original question) have not been able to reproduce the error when installing the requirements from scratch in a clean environment (even when the environment very closely matches the affected system).
Please try reinstalling your environment, or running this on a different system, and see if the problem persists.
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
|
show 2 more comments
This must be related to a peculiarity of the local system. We (commenters on the original question) have not been able to reproduce the error when installing the requirements from scratch in a clean environment (even when the environment very closely matches the affected system).
Please try reinstalling your environment, or running this on a different system, and see if the problem persists.
This must be related to a peculiarity of the local system. We (commenters on the original question) have not been able to reproduce the error when installing the requirements from scratch in a clean environment (even when the environment very closely matches the affected system).
Please try reinstalling your environment, or running this on a different system, and see if the problem persists.
edited Nov 23 '18 at 9:17
answered Nov 20 '18 at 18:47
Rob BrichenoRob Bricheno
2,365318
2,365318
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
|
show 2 more comments
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– Henry Woody
Nov 21 '18 at 18:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
@HenryWoody how does this not answer the question? The problem is reproducible only on my specific system, I couldn't even reproduce it elsewhere myself. The next person coming here with that error needs to know that their system or specific combination of versions is at fault.
– DonQuiKong
Nov 22 '18 at 20:56
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
This post does not provide specific steps to solve the problem, it just states where the issue is coming from generally. Maybe someone will find the information useful, but that does not make it an answer.
– Henry Woody
Nov 22 '18 at 21:05
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
@HenryWoody but it does. Change version or system. Problem solved.
– DonQuiKong
Nov 23 '18 at 4:39
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
So it solved your problem then?
– Henry Woody
Nov 23 '18 at 4:42
|
show 2 more comments
I use conda which might be related to the issue. I just upgraded PyQT5 with pip install PyQt5
, making this issue disappear. So that seems to be the easiest solution.
add a comment |
I use conda which might be related to the issue. I just upgraded PyQT5 with pip install PyQt5
, making this issue disappear. So that seems to be the easiest solution.
add a comment |
I use conda which might be related to the issue. I just upgraded PyQT5 with pip install PyQt5
, making this issue disappear. So that seems to be the easiest solution.
I use conda which might be related to the issue. I just upgraded PyQT5 with pip install PyQt5
, making this issue disappear. So that seems to be the easiest solution.
answered Dec 19 '18 at 9:59
DonQuiKongDonQuiKong
205112
205112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294954%2fpyqt5-program-returning-error-only-during-first-compile-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
With Python 3.7 and qt5 version 5.11.3 I do not get this error. The window seems to load correctly.
– roeen30
Nov 16 '18 at 23:59
...neither on 3.6.6
– Pavel M.
Nov 19 '18 at 9:56
I can't duplicate this problem with Python 3.7/Qt5 5.9.6. Can you tell us some more detail about your environment please so we can try and reproduce this? Thanks!
– Rob Bricheno
Nov 19 '18 at 12:53
@RobBricheno yes yes, sorry, I don't have access right now, didn't expect it to be a version thing. I installed the latest 64bit anaconda with spyder just a week ago. Python 3.7. Not sure if that's enough to duplicate it though. PyQt5
– DonQuiKong
Nov 19 '18 at 12:57
1
I have just tried this on a different system with a different version and was not able to reproduce the error. Thank you all for your help. If someone wants to add an answer that it's apparently either a very narrow version thing or a local system thing, no need to let that bounty expire. @RobBricheno
– DonQuiKong
Nov 20 '18 at 18:37