[PyQt] py3qt5 system path

Ritesh Raj Sarraf rrs at researchut.com
Wed Jun 28 06:00:58 BST 2017


On Mon, 2017-06-26 at 13:07 -0400, Scott Kitterman wrote:
> > rrs at learner:/var/tmp/Debian-Build/Result$ apt-offline-gui 
> > Traceback (most recent call last):
> >    File "/usr/bin/apt-offline-gui", line 30, in <module>
> >      from apt_offline_gui.AptOfflineQtMain import AptOfflineQtMain
> >    File "/usr/lib/python3/dist-
> > packages/apt_offline_gui/AptOfflineQtMain.py",
> > line 4, in <module>
> >      from apt_offline_gui.Ui_AptOfflineQtMain import Ui_AptOfflineMain
> >    File
> > "/usr/lib/python3/dist-packages/apt_offline_gui/Ui_AptOfflineQtMain.py",
> > line 155, in <module>
> >      import resources_rc
> > ImportError: No module named 'resources_rc'
> > 2017-06-26 / 22:19:42 ♒♒♒  ☹  => 1  
> > 
> > 
> > I am not sure why the resources module is no more resolvable from standard
> > path. The same module worked fine in Py2QT4. If I append the path to the
> > system path, things work. But then, they'd get overwritten on every pyuic3
> > run.
> > 
> > Is this a known issue ? Is there any advise on how to fix this issue ?
> 
> Imports are slightly different in Python 3 (nothing PyQt specific here).  If 
> you add:
> 
> from . import resources_rc
> 
> to apt_offline_gui/__init__.py it should work.

Hello Scott,

That does not seem to solve the issue. I still get the same error from the UIC
generated files.

rrs at learner:~/rrs-home/devel/apt-offline/apt-offline (master)$ ./apt-offline-
gui 
Traceback (most recent call last):
  File "./apt-offline-gui", line 28, in <module>
    from apt_offline_gui.AptOfflineQtMain import AptOfflineQtMain
  File "/media/SSHD/rrs-home/devel/apt-offline/apt-
offline/apt_offline_gui/AptOfflineQtMain.py", line 4, in <module>
    from apt_offline_gui.Ui_AptOfflineQtMain import Ui_AptOfflineMain
  File "/media/SSHD/rrs-home/devel/apt-offline/apt-
offline/apt_offline_gui/Ui_AptOfflineQtMain.py", line 155, in <module>
    import resources_rc
ImportError: No module named 'resources_rc'
2017-06-28 / 10:43:52 ♒♒♒  ☹  => 1  

rrs at learner:~/rrs-home/devel/apt-offline/apt-offline (master)$ cat
apt_offline_gui/__init__.py 
from . import resources_rc
2017-06-28 / 10:44:00 ♒♒♒  ☺  


-- 
Given the large number of mailing lists I follow, I request you to CC
me in replies for quicker response
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170628/7cf894ff/attachment.sig>


More information about the PyQt mailing list