1

i'm fairly new to PyQt but not totally new to Python.

I'm trying to develop a GUI using PyQt5 and Python 3.4. I was creating the interface with Qt and wanted to have an early draft of the Python script. To do that i used this command :

pyuic5 -x filename.ui -o filename.py

and it worked just fine.

But, after adding more objects in my GUI, it was not possible to create the .py file. An error occurs in the cmd and the .py created lacks the def retranslateUi and the __name__ == "__main__" parts.

I would have put a printscreen of the error message but i'm not allowed yet.

The message says :

An unexpected error occured.

Check that you are using the latest version of PyQt5 and send an error report including the following information:

  • your version of PyQt (5.4.1)
  • the UI file that caused the error
  • the debug output of pyuic5 (use the -d flag when calling pyuic5)

If anyone can enligthen me, that would be great!!

A. Rama
  • 903
  • 8
  • 18
guy16
  • 233
  • 2
  • 3
  • 16
  • I got the same error last week because I promoted a widget incorrectly. Please output the entire .ui file to the question. – ham-sandwich May 04 '15 at 14:47
  • Please follow the advice in the message and post the debug output from `pyuic5` (i.e. run the original command with the `-d` flag). – ekhumoro May 04 '15 at 16:17
  • Ok this is weird and I don't understand why, but today everything works fine! I've been using the same command with pyuic all day and it creates a .py file every time! – guy16 May 05 '15 at 16:06

0 Answers0