<div dir="auto">Hello, any update on this?<div dir="auto"><br></div><div dir="auto"><br><div dir="auto">Thanks,</div><div dir="auto">Ketan</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 1 Mar 2021, 12:27 pm Ketan Dama, <<a href="mailto:ketandama070@gmail.com">ketandama070@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, Getting the error "AttributeError: 'Bug1PyQTProperty' object has no attribute 'yAxis'"<br><br>TRACEBACK: The above exception was the direct cause of the following exception:<br><br>Traceback (most recent call last):<br>  File "..\Bug1PyQTProperty.py", line 33, in <module><br>    ex = Bug1PyQTProperty();<br>  File "..\Bug1PyQTProperty.py", line 20, in __init__<br>    self.ui.setupUi(self)<br>  File "D:\ui_Bug1PyQTProperty.py", line 24, in setupUi<br>    QtCore.QMetaObject.connectSlotsByName(Bug1PyQTProperty)<br>SystemError: <built-in function connectSlotsByName> returned a result with an error set<br><br>Please note that the error is replicated only on Python 3.6 / PyQt 5.12.3 / Qt 5.12.3 Windows 7 & 10, <br>while the script is working on Python 3.4 / PyQt 5.7.1 / Qt 5.4 / Windows 7 & 10<br><br>Kindly let me know why the script works in the version of PyQT while it fails in another version?<br><br><br>Script: Bug1PyQTProperty.py:<br><br>import sys<br>sys.dont_write_bytecode = True<br><br>from PyQt5 import QtCore, QtGui, QtWidgets<br>from PyQt5.QtCore import (pyqtProperty, pyqtSignal, pyqtSlot)<br><br><br>from ui_Bug1PyQTProperty import Ui_Bug1PyQTProperty<br><br>class Bug1PyQTProperty(QtWidgets.QWidget):<br>      def __init__(self, parent=None):<br>              super(Bug1PyQTProperty, self).__init__(parent)<br>                self.ui=Ui_Bug1PyQTProperty()<br>         self.ui.setupUi(self)<br>         self._yAxis=0<br><br>       @pyqtProperty(bool)<br>   def yAxis(self):<br>              return self._yAxis<br><br>  @yAxis.setter<br> def yAxis(self,arg):<br>          self._yAxis=arg<br><br>if __name__ == '__main__':<br> app = QtWidgets.QApplication(sys.argv);<br>       ex = Bug1PyQTProperty();<br>      ex.show();<br>    sys.exit(app.exec_())<br><br><br>Script: ui_Bug1PyQTProperty.py<br><br>from PyQt5 import QtCore, QtGui, QtWidgets<br><br>class Ui_Bug1PyQTProperty(object):<br>    def setupUi(self, Bug1PyQTProperty):<br>        Bug1PyQTProperty.setObjectName("Bug1PyQTProperty")<br>        Bug1PyQTProperty.resize(400, 300)<br>        Bug1PyQTProperty.setStyleSheet("background-color: rgb(255, 255, 0);")<br>        self.pushbutton = QPushButton(Bug1PyQTProperty)<br>        self.pushbutton.setGeometry(QtCore.QRect(150, 70, 32, 23))<br>        self.pushbutton.setStyleSheet("background-color: rgb(255, 0, 127);")<br>        self.pushbutton.setObjectName("pushbutton")<br><br>        self.retranslateUi(Bug1PyQTProperty)<br>        QtCore.QMetaObject.connectSlotsByName(Bug1PyQTProperty)<br><br>    def retranslateUi(self, Bug1PyQTProperty):<br>        _translate = QtCore.QCoreApplication.translate<br>        Bug1PyQTProperty.setWindowTitle(_translate("Bug1PyQTProperty", "Screen"))<br>               <br>Script: Bug1PyQTProperty.ui<br><br><?xml version="1.0" encoding="UTF-8"?><br><ui version="4.0"><br> <class>Bug1PyQTProperty</class><br> <widget class="QWidget" name="Bug1PyQTProperty"><br>  <property name="geometry"><br>   <rect><br>    <x>0</x><br>    <y>0</y><br>    <width>400</width><br>    <height>300</height><br>   </rect><br>  </property><br>  <property name="windowTitle"><br>   <string>Screen</string><br>  </property><br>  <property name="styleSheet"><br>   <string notr="true">background-color: rgb(255, 255, 0);</string><br>  </property><br>  <widget class="QPushButton" name="pushbutton"><br>   <property name="geometry"><br>    <rect><br>     <x>150</x><br>     <y>70</y><br>     <width>32</width><br>     <height>23</height><br>    </rect><br>   </property><br>   <property name="styleSheet"><br>    <string notr="true">background-color: rgb(255, 0, 127);</string><br>   </property><br>  </widget><br> </widget><br><br> <resources/><br> <connections/><br></ui><br></div>
</blockquote></div>