Friday 30 June 2017

pyqgis - QGIS plugin: Problems importing resources (resources_rc) file - plugin doesn't load - PATH problems?


I'm building qgis plugin and I can't find solution for this error.


File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 478, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named resources_napoved_rc

For everybody that will be asking I've built python resources file:


pyrcc4 -o resources_napoved_rc.py resources_napoved.qrc


I still can't find a way to make it work. I always get same error.


On top of the script I have:


import resources_napoved_rc.py


I'm using ui file directly from qtbuilder. Any ideas how to go forward ? I'm assuming this must be some kind of path problem or something similar.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...