Classification Workflow (classic) error message (V 3.9 RC1)
When trying to start the Classification Workflow (Classic) Algo error message:
ImportError: cannot import name 'EnviSpectralLibraryIO' from 'enmapbox.externals.qps.speclib' (C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\externals\qps\speclib\__init__.py)
Traceback (most recent call last):
File "C:\Users\PC\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\_classic\__init__.py", line 33, in startGUI
w = ClassificationWorkflowApp(parent=self.enmapbox.ui)
File "C:\Users\PC\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\_classic\classificationapp\core.py", line 41, in __init__
self.initClassifier()
File "C:\Users\PC\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\_classic\classificationapp\core.py", line 321, in initClassifier
from _classic.enmapboxgeoalgorithms.algorithms import ALGORITHMS, ClassifierFit
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\PC\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps\_classic\enmapboxgeoalgorithms\algorithms.py", line 6, in
from enmapbox.externals.qps.speclib import EnviSpectralLibraryIO
ImportError: cannot import name 'EnviSpectralLibraryIO' from 'enmapbox.externals.qps.speclib' (C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\externals\qps\speclib\__init__.py)
Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS-Version: 3.20.2-Odense Odense, 9f59a156
Comments (6)
-
-
I hope we can get rid of the app for v3.10, but for now we decided to keep it as the “Classic” version.
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
resolves
#751→ <<cset 1812a2c9ca21>>
-
Found the problem, two class definitions where moved into lower level submodules.
-
Benjamin, maybe the classes wheren’t moved. In that case you may have a circular import problem in your modul (?).
>>>from enmapbox.externals.qps.speclib import EnviSpectralLibraryIO Traceback (most recent call last): File "D:\miniconda\envs\qgis\lib\code.py", line 90, in runcode exec(code, self.locals) File "<input>", line 1, in <module> ImportError: cannot import name 'EnviSpectralLibraryIO' from 'enmapbox.externals.qps.speclib' (D:\source\QGISPlugIns\enmap-box\enmapbox\externals\qps\speclib\__init__.py)
- Log in to comment
Benjamin, can you put back the
EnviSpectralLibraryIO
class for backwards compatibility?