Hello,

I was looking to start making useful plugins in Python, so tried a dummy
test to make sure all was well - working with QGIS 2.6 32-bit on Windows 7.
Got the following:

;Working with QGIS 2.6 32 bit Windows 7

Output from the QGIS Plugin builder:
:
22/01/2015  06:58    <DIR>          .
22/01/2015  06:58    <DIR>          ..
22/01/2015  06:57    <DIR>          help
21/01/2015  22:03    <DIR>          i18n
21/01/2015  22:03             1,034 icon.png
22/01/2015  06:57             7,229 Makefile
22/01/2015  06:57               811 metadata.txt
22/01/2015  06:57             2,642 pb_tool.cfg
21/01/2015  22:03             3,217 plugin_upload.py
21/01/2015  22:03             8,798 pylintrc
22/01/2015  06:57             2,019 README.html
22/01/2015  06:57               967 README.txt
22/01/2015  06:57               107 resources.qrc
21/01/2015  22:03    <DIR>          scripts
22/01/2015  06:57    <DIR>          test
22/01/2015  06:57             6,549 testbuilder.py
22/01/2015  06:58                 0 testbuilder.txt
22/01/2015  06:57             1,789 testbuilder_dialog.py
22/01/2015  06:57             1,493 testbuilder_dialog_base.ui
22/01/2015  06:57             1,486 __init__.py

>From OSGeo4W command window on Windows 7 32 bit

C:\Test_QGIS_Plugin\TestBuilder>pyuic4 -o ui_testbuilder.py
testbuilder_dialog_base.ui
C:\Test_QGIS_Plugin\TestBuilder>pyrcc4 -o resources.py resources.qrc

Loaded directory into: \.qgis2\python\plugins and started QGIS. Plugin
listed but no icon, shows in the plugin list and sort of runs. Close QGIS
and reopen the following error is generated:

Couldn't load plugin TestBuild due an error when calling its classFactory()
method


Traceback (most recent call last):
  File "C:/PROGRA~2/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 208,
in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/Lester/.qgis2/python/plugins\TestBuild\__init__.py", line
34, in classFactory
    from .testbuilder import TestBuild
  File "C:/PROGRA~2/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460,
in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Lester/.qgis2/python/plugins\TestBuild\testbuilder.py",
line 26, in
    import resources_rc
  File "C:/PROGRA~2/QGISBR~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


Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


QGIS version:
2.6.0-Brighton Brighton, exported

Python path: ['C:/PROGRA~2/QGISBR~1/apps/qgis/./python',
u'C:/Users/Lester/.qgis2/python', u'C:/Users/Lester/.qgis2/python/plugins',
'C:/PROGRA~2/QGISBR~1/apps/qgis/./python/plugins',
'C:\\PROGRA~2\\QGISBR~1\\bin\\python27.zip',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\DLLs',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\plat-win',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\lib-tk',
'C:\\PROGRA~2\\QGISBR~1\\bin', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\PIL',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win32.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\python_dateutil-2.2-py2.7.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\pytz-2014.2-py2.7.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\win32',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win32.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\six-1.6.1-py2.7.egg',
'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode']

Is there something I have missed here?

Thanks for any help

Lester
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to