1

I followed QGIS Tutorials and Tips and QGIS Plugin Builder 2.0 documentation but I the plugin fails to load when I copy all files in the plugin folder and start QGIS. I put all the code on github, may it work on another machine.

In addition make deploy causes an error as well as it seems sphinx-build isn't installed but I don't know how it install it, neither do I understand why one guide uses only make and the other one uses make deploy~~


make deploy causes

------------------------------------
Building documentation using sphinx.
------------------------------------
cd help; make html
make[1]: Entering directory `/c/Users/Stefan/.qgis2/python/plugins/GPXandKMLExport_TheWayIWantItQGIS2/help'
sphinx-build -b html -d build/doctrees   source build/html
make[1]: sphinx-build: Command not found
make[1]: *** [html] Error 127
make[1]: Leaving directory `/c/Users/Stefan/.qgis2/python/plugins/GPXandKMLExport_TheWayIWantItQGIS2/help'
make: *** [doc] Error 2

That is the error message I get. I have no clue in what file line 13, column 23 shalll be neihter do I know what is menad by calling its classFactory() method

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

Traceback (most recent call last):
  File "D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/Stefan/.qgis2/python/plugins\GPXandKMLExport_TheWayIWantItQGIS2\__init__.py", line 34, in classFactory
    from .gpx_and_kml_export_the_way_iW_want_it_qgis2 import GPXandKMLExport_TheWayIWantItQGIS2
  File "D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Stefan/.qgis2/python/plugins\GPXandKMLExport_TheWayIWantItQGIS2\gpx_and_kml_export_the_way_iW_want_it_qgis2.py", line 28, in 
    from gpx_and_kml_export_the_way_iW_want_it_qgis2_dialog import GPXandKMLExport_TheWayIWantItQGIS2Dialog
  File "D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Stefan/.qgis2/python/plugins\GPXandKMLExport_TheWayIWantItQGIS2\gpx_and_kml_export_the_way_iW_want_it_qgis2_dialog.py", line 29, in 
    os.path.dirname(__file__), 'gpx_and_kml_export_the_way_iW_want_it_qgis2_dialog_base.ui'))
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 210, in loadUiType
    winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\Compiler\compiler.py", line 139, in compileUi
    w = self.parse(input_stream, resource_suffix)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 925, in parse
    document = parse(filename)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\xml\etree\ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\xml\etree\ElementTree.py", line 656, in parse
    parser.feed(data)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\xml\etree\ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 13, column 23 

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64
bit (AMD64)]  QGIS version: 2.18.15 Las Palmas, ac2d111ed1 

Python Path:
D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing    
D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python    
C:/Users/Stefan/.qgis2/python        
C:/Users/Stefan/.qgis2/python/plugins    
D:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins     C:\Program Files
(x86)\OpenLibraries\python     D:\PROGRA~1\QGIS2~1.18\bin\python27.zip
D:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk    
D:\PROGRA~1\QGIS2~1.18\bin     D:\PROGRA~1\QGIS2~1.18\apps\Python27   
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin    
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
D:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/Stefan/.qgis2//python    
C:\Users\Stefan\.qgis2\python\plugins\DigitizingTools\tools    
C:/Users/Stefan/.qgis2/python/plugins\go2streetview    
C:\Users\Stefan\.qgis2\python\plugins\mmqgis/forms
  • nope anything went fine, builder output: QGIS Plugin Builder 2.0 result. The make only command only showed the expected results as shown on QGIS Tutorials and Tips. – Stefan Apr 1 '18 at 12:02
  • I followed A Quick Guide to Getting Started with PyQGIS on Windows but I've got only >>>easy_install pip File "<stdin>", line 1, in <module> NameError: name 'easy_install' is not defined and >>> pip install pb_tool File "<stdin>", line 1 pip install pb_tool ^ SyntaxError: invalid syntax – Stefan Apr 1 '18 at 15:14
  • I've just came accross pip.exe: Fatal error in launcher: Unable to create process using '"' what enables me to install pip and pb_tool typing python -m easy_install pip and python -m pip install pb_tool. The previous mentioned method still causes the same errors. Finally I tried installing sphinx and got python -m pip install sphinx Requirement already satisfied:... For whatever reason sphinx is now installed and up to date, so make deploy works now. – Stefan Apr 1 '18 at 15:40
  • It looks like there is an error in your .ui file. – gsherman Apr 4 '18 at 13:29
  • How do you know. I don't know where to start searching based on this mysterious error message :( – Stefan Apr 4 '18 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.