[PyQt] trouble running PyQt-4.5 configure.py with python3

Phil Thompson phil at riverbankcomputing.com
Wed Mar 25 11:37:38 GMT 2009


On Wed, 25 Mar 2009 07:29:45 -0400, Darren Dale <dsdale24 at gmail.com> wrote:
> This morning I tried to install last nights snapshots on Kubuntu Jaunty
for
> python-3.0.1. "python configure.py" would get up to the point were this
is
> printed:
> 
> Type '2' to view the GPL v2 license.
> Type '3' to view the GPL v3 license.
> Type 'yes' to accept the terms of the license.
> Type 'no' to decline the terms of the license.
> 
> but it would not prompt me to accept the license. The script was getting
> stuck in the while loop that asks if we accept the terms of the license.
I
> edited configure.py:
> 
>         # Handle Python v2.
>         try:
>             input = raw_input
>         except NameError:
>             pass
> 
>         while 1:
>             try:
>                 resp = input("Do you accept the terms of the license? ")
>             except KeyboardInterrupt:
>                 raise SystemExit
> #            except:
> #                resp = ""
> 
> and ran the script again, which yielded:
> 
> An internal error occured.  Please report all the output from the
program,
> including the following traceback, to support at riverbankcomputing.com.
> Traceback (most recent call last):
>   File "configure.py", line 1900, in <module>
>     main()
>   File "configure.py", line 1848, in main
>     check_license()
>   File "configure.py", line 1478, in check_license
>     resp = input("Do you accept the terms of the license? ")
> UnboundLocalError: local variable 'input' referenced before assignment
> 
> 
> If I comment this out instead:
> 
> #        try:
> #            input = raw_input
> #        except NameError:
> #            pass
> 
> Then I configure.py will run without errors with python-3. Maybe this is
a
> bug in python, or just Jaunty's python, but perhaps a workaround could be
> considered for configure.py.

Already reported and fixed - just pass --confirm-license as a workaround.

Phil


More information about the PyQt mailing list