Error running pyuic6

Detlev Offenbach detlev at die-offenbachs.de
Mon Jun 24 17:52:50 BST 2024


Hi,

you are facing the same issue that I reported some time ago already. 
Phil has changed the sources to cope with the current situation, which 
is caused by a change in Qt Designer starting with Qt 6.7.0. Your 
possible solutions are as follows.

1. Use the PyQt6 6.7.1 provided by Phil through his lokal PyPI server.

2. Use Qt Designer of Qt 6.6.x.

I opted for the second solution for the moment.

Regards,
Detlev

Am 24.06.24 um 15:09 schrieb Panagiotis Iosif:
> 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
>
>
-- 
Detlev Offenbach
detlev at die-offenbachs.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/9f38a01b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xBD1F26A5DA8A6150.asc
Type: application/pgp-keys
Size: 660 bytes
Desc: OpenPGP public key
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/9f38a01b/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240624/9f38a01b/attachment.sig>


More information about the PyQt mailing list