Speclib: AttributeError: 'QgsVectorLayer' object has no attribute 'addProfiles'
- Open library_berlin
- Collect a spectrum somewhere in the EnMAP image
- The error occurs
I know, this should not work as the spectral resolution is different and presumably as the testdata library has no geometry. But the error message indicates there might be something wrong? Maybe a warning should show up if map spectra can not be added to library for whatever reason
An error has occurred while executing Python code:
AttributeError: 'QgsVectorLayer' object has no attribute 'addProfiles'
Traceback (most recent call last):
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/gui/enmapboxgui.py", line 1288, in
lambda crs, pt, c=canvas: self.setCurrentLocation(SpatialPoint(crs, pt), canvas)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/gui/enmapboxgui.py", line 1724, in setCurrentLocation
self.loadCurrentMapSpectra(spatialPoint, mapCanvas)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/gui/enmapboxgui.py", line 1346, in loadCurrentMapSpectra
panel.loadCurrentMapSpectra(spatialPoint, mapCanvas=mapCanvas, runAsync=runAsync)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectralprofilesources.py", line 2286, in loadCurrentMapSpectra
return self.mBridge.loadProfiles(spatialPoint, mapCanvas=mapCanvas, runAsync=runAsync)
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectralprofilesources.py", line 1689, in loadProfiles
slw.setCurrentProfiles(RESULTS[speclib.id()],
File "/root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibrarywidget.py", line 515, in setCurrentProfiles
addedKeys = speclib.addProfiles(currentProfiles)
AttributeError: 'QgsVectorLayer' object has no attribute 'addProfiles'
Python version: 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
QGIS version: 3.22.0-Białowieża Białowieża, exported
Comments (11)
-
-
@Benjamin Jakimow , as I merged dev into master, I got a conflict, which I resolved by using the dev version. Maybe something went wrong here:
-
Ok, just checked, the problem already existed before merging into master.
-
-
assigned issue to
-
assigned issue to
-
@Andreas Rabe please never merge conflicts. Solve them first. What was the conflict about?
-
I solved by using the DEV version.
-
The conflict was in the external QPS package, which is not controlled by the EnMAP-Box repo.
-
| I solved by using the DEV version.
Sure? The conflicted file now exists in the develop but should’nt be there any more -
- changed status to resolved
resolves
#826Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 46c6328fd52e>>
-
I added my commit by rebase and updated qps. qps/speclib/gui.py should not exist anymore (as was before)
-
Sure? The conflicted file now exists in the develop but should’nt be there any more
As you ask … not sure
I most likely got the “mine vs. theirs” thing wrong again.Though I’m not the only one it seams: https://stackoverflow.com/questions/31817210/git-confusion-over-terminology-theirs-vs-mine
- Log in to comment
Confirmed on Windows 10.
This should be possible, this is a bug.