Closed danschef closed 1 year ago
@jakimowb , @thielfab maybe this is related to Linux or Python 3.10, which I don't have on my system. Can one of you reproduce this?
@janzandr python 3.10 is available in an up-to-date conda installation
I'll try the mambaforge installation recommended by @danschef: https://enmap.git-pages.gfz-potsdam.de/GFZ_Tools_EnMAP_BOX/EnPT/doc/installation.html#installing-enpt-along-with-qgis-and-the-enmap-box-backend-gui
Alright, I can reproduce this inside the mambaforge environment.
Needed to update the typeguard package, which we ship together with the EnMAP-Box (enmap-box/site-packages/typeguard). Old typeguard version wasn't playing nicely together with Python 3.10. Works now, after fixing some other failing typechecks related to the QgisInterface class. @jakimowb, we may encounter more of these failing typechecks at runtime in a Python 3.10 environment.
@janzandr Thanks for fixing! Would it be possible to have a bug-fix release for the EnMAP-Box 3.11 that includes this? 3.12 does not seem to be stable, yet, and we need a properly working version for the workshop in march.
Why do you actually ship typeguard together with the EnMAP-Box instead of just adding it to the requirements.txt? From my point of view, this will always lead into incompatibilities after some time, just because you use a frozen code base there.
Why do you actually ship typeguard together with the EnMAP-Box instead of just adding it to the requirements.txt? From my point of view, this will always lead into incompatibilities after some time, just because you use a frozen code base there.
Yes, good point. @jakimowb, can't remember, was there a reason not adding it to the requirements.txt?
Would it be possible to have a bug-fix release for the EnMAP-Box 3.11 that includes this? 3.12 does not seem to be stable, yet, and we need a properly working version for the workshop in march.
I released a dev-version that includes the fix: https://github.com/EnMAP-Box/enmap-box/releases/tag/v3.12-alpha.7
I would suggest having a v3.12 build for the workshop.
Thanks, but this is an Alpha version. I tested it last week and it did not seem to be stable so far. I would really like to have a 3.11.2 version that includes this fix, just to be sure we have something working - for the workshop but also to be able to test my tools in the next weeks.
Thanks, but this is an Alpha version. I tested it last week
It's not the version from last week, I just uploaded it.
and it did not seem to be stable so far.
We still have time fixing stuff. Just report the stuff that isn't working. We prefere to work on the DEV version, because backporting is always more complicated. We usually only do backports for blocking/critical issues.
Why do you actually ship typeguard together with the EnMAP-Box instead of just adding it to the requirements.txt? From my point of view, this will always lead into incompatibilities after some time, just because you use a frozen code base there.
Yes, good point. @jakimowb, can't remember, was there a reason not adding it to the requirements.txt?
I think the main reason was that the EnMAP-Box should start and work (basic functionality, GUI etc.) without the need of having dependencies installed.
BTW. If I install your version from above in a fresh QGIS (Ubuntu docker) I get an ModuleNotFoundError: No module named 'typing_extensions'
error.
Hi @thielfab, please show full stacktrace.
Couldn't load plugin 'enmapboxplugin' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'typing_extensions'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/__init__.py", line 55, in classFactory
raise ex
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/__init__.py", line 50, in classFactory
from enmapbox.enmapboxplugin import EnMAPBoxPlugin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/__init__.py", line 411, in
from enmapbox.gui.enmapboxgui import EnMAPBox
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/gui/enmapboxgui.py", line 27, in
from typeguard import typechecked
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/site-packages/typeguard/__init__.py", line 28, in
from ._checkers import (
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/site-packages/typeguard/_checkers.py", line 50, in
from typing_extensions import Any as SubclassableAny
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'typing_extensions'
Python version: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
QGIS version: 3.28.2-Firenze Firenze, b47e00ba60
Looks like the 'typing_extensions' module is not part of your distribution.
Can't you import it in QGIS?
If this is only happening in the docker version, I would recommend to just fix it with:
pip install typing-extensions
Would that be fine for you?
Indeed, typing_extensions
is not available. This will presumably be the case for Ubuntu (22.04) and all derivatives in general, not only docker (just tested with WSL and our server).
@jakimowb, @thielfab and @danschef, please note #345.
When right-clicking on a raster layer listed in the "Data Sources" panel of the EnMAP-Box 3.11.1, only the following error pops up instead of showing a context menu: