You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I normally run your program using spyder. But now I am migrating towards Visual Studio with Python tools 2015. Every time I launch PyGMI_Launcher.py I receive the following error:
self.config_dict['macfold']=self.ui.macfold.text().encode('utf'8)
AttributeError: 'Qstring' object has no attribute 'encode'
The text was updated successfully, but these errors were encountered:
Hi,
so with pyQt and Qt 4.8 on my system, QLineEdit.text() returns a unicode
string. But in your case it returns a QString. the simple fix then is to
replace all the ".encode('utf8')" by the equivalent for Qstring that is ".
toUtf8 <http://pyqt.sourceforge.net/Docs/PyQt4/qstring.html#toUtf8>()"
I believe this is due to one of the joy of PyQt/Qt: ever changing
definitions breaking backward compatibility to keep you busy! Yeah!
Regards,
Maxime
I normally run your program using spyder. But now I am migrating towards Visual Studio with Python tools 2015. Every time I launch PyGMI_Launcher.py I receive the following error:
self.config_dict['macfold']=self.ui.macfold.text().encode('utf'8)
AttributeError: 'Qstring' object has no attribute 'encode'
The text was updated successfully, but these errors were encountered: