gilliM / vectorCompare

QGIS plugin for comparaison of two vector layer - done for classification validation purposes
GNU General Public License v3.0
0 stars 0 forks source link

cannot import name NavigationToolbar2QTAgg #1

Open fermier opened 7 years ago

fermier commented 7 years ago

Installed version: 0.2 (in C:\Users\username.qgis2\python\plugins\VectorCompare) Available version: 0.2 (in QGIS Official Plugin Repository)

qgis version 2.18.13

Python error:

2017-12-05T17:06:51 1 Traceback (most recent call last): File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/username/.qgis2/python/plugins\VectorCompare__init__.py", line 34, in classFactory from .vector_compare import VectorCompare File "C:/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/username/.qgis2/python/plugins\VectorCompare\vector_compare.py", line 28, in from vector_compare_dialog import VectorCompareDialog File "C:/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/username/.qgis2/python/plugins\VectorCompare\vector_compare_dialog.py", line 32, in from pyplot_widget import pyPlotWidget File "C:/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/username/.qgis2/python/plugins\VectorCompare\pyplot_widget.py", line 25, in from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar ImportError: cannot import name NavigationToolbar2QTAgg

Python warning:

2017-12-05T17:06:47 1 warning:C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py:844: PendingDeprecationWarning: This method will be removed in future versions. Use 'elem.iter()' or 'list(elem.iter())' instead. for include in elem.getiterator("include"):

        traceback:  File "<string>", line 1, in <module>
          File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin
            plugins[packageName] = package.classFactory(iface)
          File "C:/Users/username/.qgis2/python/plugins\profiletool\__init__.py", line 27, in classFactory
            from profileplugin import ProfilePlugin
          File "C:/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/username/.qgis2/python/plugins\profiletool\profileplugin.py", line 34, in <module>
            from ui.ptdockwidget import PTDockWidget
          File "C:/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/username/.qgis2/python/plugins\profiletool\ui\ptdockwidget.py", line 52, in <module>
            FormClass = uic.loadUiType(uiFilePath)[0]
          File "C:\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 "C:\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 "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 933, in parse
            actor(elem)
          File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 844, in readResources
            for include in elem.getiterator("include"):

2017-12-05T17:06:51 1 warning:C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py:607: ImportWarning: Not importing directory 'C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\test': missing init.py mod = _builtin_import(name, globals, locals, fromlist, level)

        traceback:  File "<string>", line 1, in <module>
          File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin
            plugins[packageName] = package.classFactory(iface)
          File "C:/Users/username/.qgis2/python/plugins\VectorCompare\__init__.py", line 34, in classFactory
            from .vector_compare import VectorCompare
          File "C:/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/username/.qgis2/python/plugins\VectorCompare\vector_compare.py", line 28, in <module>
            from vector_compare_dialog import VectorCompareDialog
          File "C:/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/username/.qgis2/python/plugins\VectorCompare\vector_compare_dialog.py", line 28, in <module>
            import processing
          File "C:/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:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\__init__.py", line 29, in <module>
            from processing.tools.general import *              # NOQA
          File "C:/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:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\tools\general.py", line 31, in <module>
            from processing.core.Processing import Processing
          File "C:/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:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\core\Processing.py", line 62, in <module>
            from processing.algs.saga.SagaAlgorithmProvider import SagaAlgorithmProvider
          File "C:/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:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\algs\saga\SagaAlgorithmProvider.py", line 33, in <module>
            from SagaAlgorithm import SagaAlgorithm
          File "C:/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:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\algs\saga\SagaAlgorithm.py", line 20, in <module>
            standard_library.install_aliases()
          File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\future\standard_library\__init__.py", line 483, in install_aliases
            import test
gilliM commented 7 years ago

I guess you have qt5 installed. Can you type the following in the python window of qgis, and tell me if an error is raised ? then I could implement a fix for a qt5 backend

from matplotlib.backends.backend_qt5agg import NavigationToolbar2QTAgg as NavigationToolbar