EnMAP-Box / enmap-box

EnMAP-Box source code repository. See https://enmap-box.readthedocs.io for documentation
GNU General Public License v3.0
35 stars 16 forks source link

TypeError: QgsProcessingParameterDefinition.setFlags(): argument 1 has unexpected type 'int' #822

Closed aloboa closed 4 months ago

aloboa commented 4 months ago

Just at QGIS start if enmapbox is active...

TypeError: QgsProcessingParameterDefinition.setFlags(): argument 1 has unexpected type 'int' 
Traceback (most recent call last):
  File "/home/alobo/.local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapboxprocessing/algorithm/build3dcubealgorithm.py", line 49, in initAlgorithm
    self.addParameterFloat(self.P_SPECTRAL_SCALE, self._SPECTRAL_SCALE, 1, True, 0, None, True)
  File "/home/alobo/.local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapboxprocessing/enmapalgorithm.py", line 886, in addParameterFloat
    self.flagParameterAsAdvanced(name, advanced)
  File "/home/alobo/.local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapboxprocessing/enmapalgorithm.py", line 975, in flagParameterAsAdvanced
    p.setFlags(int(p.flags()) | QgsProcessingParameterDefinition.Flag.FlagAdvanced)
TypeError: QgsProcessingParameterDefinition.setFlags(): argument 1 has unexpected type 'int'

Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] 
QGIS version: 3.36.0-Maidenhead Maidenhead, 09951dc0acf 
jakimowb commented 4 months ago

This bug was already solved with #820, we just need to release the next EnMAP-Box version. I'll prepare an experimental 3.14.

aloboa commented 4 months ago

This bug was already solved with #820, we just need to release the next EnMAP-Box version. I'll prepare an experimental 3.14.

Is this error present in QGIS 3.34.3? I am running QGIS 3.36.0-Maidenhead, perhaps I should have not upgraded.

aloboa commented 4 months ago

The QGIS/PLugins/EnMap-Box 3 mentions Available version (experimental) [3.14-alpha.0](https://plugins.qgis.org/plugins/enmapboxplugin/version/3.14-alpha.0/) updated at 12/8/2023 8:45 AM I understand that is not the one you refer to.

janzandr commented 4 months ago

The fix will be released this Friday with version v3.13.4

aloboa commented 4 months ago

Meanwhile, would downgrading QGIS to 3.34.4 LTR avoid the error?

janzandr commented 4 months ago

I'm not sure about that, probably not, because the LatestRelease and the LongTermRelease are using the same Python version (at least in the OSGeo4W setting).