On Thu, 2 Dec 2010 12:24:54 +0100, Thorsten Kampe
<thors...@thorstenkampe.de> wrote:
> Hi,
> 
> I'm trying to port a PyQt4 application from Python 2 to Python 3. The 
> application works fine with the latest Python 2 (2.7.1) but not with 
> Python 3.1.2:
> 
> Traceback (most recent call last):
>   File "my_application.pyw", line 10, in <module>
>     import resource.ui
>   File "F:\[path]\resource\ui.py", line 84, in <module>
>     import resource_rc
> ImportError: No module named resource_rc
> 
> This is the directory structure:
> |-- my_application.pyw*  (main application, "import resource.ui")
> `-- resource/
>     |-- __init__.py      (package file to enable module import)
>     |-- resource_rc.py   (generated by pyrcc4)
>     `-- ui.py            (generated by pyuic4, "import resource_rc")
> 
> I couldn't find any documentation regarding changes between the latest 
> Python 2 and 3. Who knows what's going on and what I can do?!

Make sure you regenerate resource_rc.py with the -py3 argument to pyrcc4.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to