-
assigned issue to
- edited description
AttributeError:'operator.itemgetter' object has no attribute '__module__
Error on startup: Workflow App and Algorithms will not be loaded
EnMAPBoxApplication error(s):
classificationworkflowapp:
AttributeError:'operator.itemgetter' object has no attribute '\_\_module\_\_'
Traceback:
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapbox\\gui\\applications.py", line 275, in addApplicationFolder
appModule = importlib.import\_module\(appPkgName\)
File "C:\\OSGEO4~1\\apps\\Python37\\lib\\importlib\\\_\_init\_\_.py", line 127, in import\_module
return \_bootstrap.\_gcd\_import\(name\[level:\], package, level\)
File "<frozen importlib.\_bootstrap>", line 1006, in \_gcd\_import
File "<frozen importlib.\_bootstrap>", line 983, in \_find\_and\_load
File "<frozen importlib.\_bootstrap>", line 967, in \_find\_and\_load\_unlocked
File "<frozen importlib.\_bootstrap>", line 677, in \_load\_unlocked
File "<frozen importlib.\_bootstrap\_external>", line 728, in exec\_module
File "<frozen importlib.\_bootstrap>", line 219, in \_call\_with\_frames\_removed
File "C:\\Users\\thielf54\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins\\enmapboxplugin\\enmapbox\\coreapps\\classificationworkflowapp\\\_\_init\_\_.py", line 4, in <module>
from classificationworkflowapp.classificationworkflowgui import ClassificationWorkflowGui
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:\\Users\\thielf54\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins\\enmapboxplugin\\enmapbox\\coreapps\\classificationworkflowapp\\classificationworkflowgui.py", line 21, in <module>
from enmapboxprocessing.algorithm.algorithms import algorithms
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\algorithm\\algorithms.py", line 1, in <module>
from enmapboxprocessing.algorithm.classificationperformancesimplealgorithm import \\
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\algorithm\\classificationperformancesimplealgorithm.py", line 6, in <module>
from enmapboxprocessing.algorithm.classificationperformancestratifiedalgorithm import \\
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\algorithm\\classificationperformancestratifiedalgorithm.py", line 10, in <module>
from enmapboxprocessing.algorithm.rasterizecategorizedvectoralgorithm import RasterizeCategorizedVectorAlgorithm
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\algorithm\\rasterizecategorizedvectoralgorithm.py", line 10, in <module>
from enmapboxprocessing.algorithm.rasterizevectoralgorithm import RasterizeVectorAlgorithm
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\algorithm\\rasterizevectoralgorithm.py", line 9, in <module>
from enmapboxprocessing.driver import Driver
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\driver.py", line 6, in <module>
from enmapboxprocessing.rasterreader import RasterReader
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\rasterreader.py", line 13, in <module>
from enmapboxprocessing.typing import \(QgisDataType, RasterSource, Array3d, Metadata, MetadataValue,
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ee\_plugin\\\_\_init\_\_.py", line 32, in \_\_wrapping\_ee\_import\_\_
\_module\_ = \_\_builtin\_import\_\_\(name, \*args, \*\*kwargs\)
File "C:/OSGEO4~1/apps/qgis-ltr/./python\\qgis\\utils.py", line 793, in \_import
mod = \_builtin\_import\(name, globals, locals, fromlist, level\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\enmapboxprocessing\\typing.py", line 27, in <module>
class Category\(NamedTuple\):
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\site-packages\\typeguard\\\_\_init\_\_.py", line 882, in typechecked
property\_func, always=always, \_localns=func.\_\_dict\_\_
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\site-packages\\typeguard\\\_\_init\_\_.py", line 897, in typechecked
warn\('no type annotations present -- not typechecking \{\}'.format\(function\_name\(func\)\)\)
File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\enmapboxplugin\\site-packages\\typeguard\\\_\_init\_\_.py", line 245, in function\_name
module = func.\_\_module\_\_
Version 3.7.20210506T134511.develop
GDAL 3.1.4
Python 3.7
Comments (9)
-
reporter -
reporter Seems not to occur in python versions > 3.7
-
Hmm, officially Python 3.7 is not supported anymore: https://en.wikipedia.org/wiki/History_of_Python#Table_of_versions
Maybe we just leave it as is and suggest updating to >3.7
-
- changed status to on hold
-
reporter And how would the average user do that? They can’t.
Osgeo4w installer and packaged QGIS 3.18 come with python 3.7 (which is far from old, will be maintained until 2023) -
Ah ok, if this also affects OSGeo4W than I will check.
-
Seams to be a very specific problem with NamedTuples and Python 3.7
Can be reproduced by a simply import:
import enmapboxprocessing.typing
Also found an issue that is not yet resolved: https://www.gitmemory.com/issue/agronholm/typeguard/175/780140917
I’ll try to work around it!
-
Ok, I simply replaced all type checked NamedTuple classes by DataClasses.
-
- changed status to resolved
resolves
#664→ <<cset a2ed22c251e2>>
- Log in to comment