[Qgis-developer] Problem with resources_rc

Virginia vir_portillo at hotmail.com
Wed Feb 11 04:46:54 PST 2015


Hello,
I am newbie developing on python for QGIS.
I am trying to load an image in a label in a form of a plugin that I am developing for QGIS.
I can choose the image from file or from resources. When I choose from "resources" I choose my resources.qrc file of my plugin and then I choose the image I want and  I can see the image in the form from QT4 designer.
Next step is compile and test the plugin opening QGIS 2.6.1 and while opening I receive an error as follows :
No
se pudo cargar el complemento AppGeneral debido a un error al llamar a su
método classFactory()Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 208,
in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File
"C:/Users/virginia.MCB/.qgis2/python/plugins\AppGeneral\__init__.py",
line 34, in classFactory
    from .app_general import AppGeneral
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 460,
in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"C:/Users/virginia.MCB/.qgis2/python/plugins\AppGeneral\app_general.py",
line 32, in 
    from app_general_dialog import AppGeneralDialog
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 460,
in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"C:/Users/virginia.MCB/.qgis2/python/plugins\AppGeneral\app_general_dialog.py",
line 29, in 
    os.path.dirname(__file__), 'app_general_dialog_base.ui'))
  File
"C:\OSGEO4~1\apps\Python27\lib\site-packages\PyQt4\uic\__init__.py",
line 213, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "", line 179, in 
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 460,
in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named resources_rc
Versión de Python:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
I already have resources_rc file in the path of
my plugin and it is already compiled so I don't understand what is the problem because I don't find
any other way to load images different than this.
Thanks for all. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150211/17474310/attachment.html>


More information about the Qgis-developer mailing list