[PyQt] Python2 Errors in Installer
Phil Thompson
phil at riverbankcomputing.com
Wed Nov 23 14:57:27 GMT 2016
On 17 Nov 2016, at 7:52 pm, Cody Scott <cody at perspexis.com> wrote:
>
> I am using pynsist to create an installer and that works great.
>
> During installation it tries to pre generate the __pycache__/ folders but it can't compile some files and they show up as errors.
>
> They are caused by using Python2 syntax.
>
> PyQt5/uic/port_v2/invoke.py
> line 36 except IOError, e:
> line 39 except SyntaxError, e:
> line 42 except NoSuchWidgetError, e:
> line 45 except Exception, e:
>
> PyQt5\uic\port_v2\load_plugin.py
> line 38 except Exception, e:
>
> Should be an easy fix
>
> except Exception as e:
>
> will work in both Python 2.7 and Python 3
>
> Maybe the PyQt5/uic/port_v2/ shouldn't be included in the Python 3 wheel?
All the code that was required by Python v2.5 and earlier has now been removed. I think that will fix any syntax errors.
Phil
More information about the PyQt
mailing list