pyarchinit / vector_georeferencer_plugin

A visual tool to georeferencing vector layers version=0.1 author=Giuliano Curti, Luca Mandolesi, Giuseppe Patti
1 stars 3 forks source link

ImportError: No module named resources_rc impossible to load plugin... #11

Open marcobra opened 9 years ago

marcobra commented 9 years ago

Impossibile caricare il plugin vectGeoref a causa di un errore chiamando il metodo classFactory()

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 219, in startPlugin plugins[packageName] = package.classFactory(iface) File "/home/ubuntu/.qgis2/python/plugins/vectGeoref/init.py", line 26, in classFactory from vectorgeoref import VectorGeoref File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ubuntu/.qgis2/python/plugins/vectGeoref/vectorgeoref.py", line 32, in import resources_rc 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_rc

Versione Python: 2.7.6 (default, Mar 22 2014, 23:03:41) [GCC 4.8.2]

Versione di QGIS: 2.8.1-Wien Wien, exported

sowmyakinib commented 8 years ago

open resources_rc file in a notepad and add qCleanupResources() at the last line and save it. If you are unable to save the changes (you might get notification telling access denied) right click the folder which contains resources_rc file and change the security settings. Provide access to the required user and remove access to the owner by assigning owner to other groups. Now you can make changes to resources_rc. Now try opening the plugin. This worked out for me. Hope this helps you.

marcobra commented 7 years ago

Seems there is no resources.py in included in python plugin so we need to create it: in Ubuntu

cd $HOME/.qgis2/python/plugins/vectGeoref/
pyrcc4 resources.qrc -o resources.py

then from plugins manager re enable plugin and restart qgis

Machine-builder commented 6 years ago

Here - I made a little text file for myself for every time that I forget how :


1 . copy all images and the .qrc files into the same directory as the python script

2 . open command prompt

3 . enter this command : CD $YourPythonScriptDirectory$

4 . enter this command : pyrcc4 $NameOfQrcFile -o Resources_rc.py

5 . Done!