Error running pyuic6

Panagiotis Iosif paniosif at gmail.com
Mon Jun 24 14:09:32 BST 2024


Hello,

I am facing an issue when trying to run *pyuic6 *to convert my ".ui" file
to a ".py" file.

The command I am running is this one:
pyuic6 tabs.ui -o tabs.py

An the error I get says the following:
----------
An unexpected error occurred.
Check that you are using the latest version of pyuic6 and send an error
report
to the PyQt mailing list and include the following information:
- your version of pyuic6 (6.7.0)
- the .ui file that caused this error
- the debug output of pyuic6 (use the --debug flag when calling pyuic6)
----------

As per the error's instructions, I am attaching the "tabs.ui" file and the
output of the command:
pyuic6 tabs.ui -o tabs.py --debug 2>&1 | tee -a pyuic6_output.log

I suspect that when I save the files "tabs.ui" from Qt Designer, the
property "Orientation" gets saved as "Qt::Orientation::Horizontal".

However, the file "properties.py" that resides in my miniconda installation
at:

/home/paniosif/miniconda3/envs/ahead3/lib/python3.9/site-packages/PyQt6/uic/properties.py

probably handles "Orientation" differently.

For example, checking the contents of that file and searching for the
keyword "Orientation" this is what I see:
----------
def orientation(self, widget, prop):
        # If the class is a QFrame, it's a line.
        if widget.metaObject().className() == 'QFrame':
            widget.setFrameShape(
                {'Qt::Horizontal': QtWidgets.QFrame.Shape.HLine,
                 'Qt::Vertical'  :
QtWidgets.QFrame.Shape.VLine}[prop[0].text])
        else:
            widget.setOrientation(self._enum(prop[0]))
----------

Does anyone have an idea as to how I can solve this issue?

(I guess I can always manually edit either "properties.py" stored in the
"uic" folder or my "tabs.ui" file as needed to make sure they agree on the
definition of "Qt::Orientation::Horizontal".

I do not know though if this works as it should.

I would expect that saving a ".ui" file through Qt Designer (version 6.7.0)
would respect whatever definitions of properties are needed from "uic".

Am I missing something?

Thanks for any help!

Best,
Panagiotis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/ee0e39da/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabs.ui
Type: application/x-designer
Size: 49536 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/ee0e39da/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyuic6_output.log
Type: text/x-log
Size: 6147 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/ee0e39da/attachment-0003.bin>


More information about the PyQt mailing list