FLO-2DSoftware / qgis-flo-2d-plugin

A plugin for pre-processing/post-processing FLO-2D models
5 stars 7 forks source link

Elevation to gpkg error message #1376

Closed FLO-2DKaren closed 2 weeks ago

FLO-2DKaren commented 3 weeks ago

I got this message when I added 3 elevation layers to the geopackage. Maybe it was the Modifed one that caused the issues. Or any of them.

Test project is to add elevation layer to geopackage. I'll post a test project below but you should have the elevation files already.

2024-06-11T10:46:43 WARNING Traceback (most recent call last): File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d\flo2d.py", line 1053, in flo_save_project dlg_gpkg_management.save_layers() File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d\gui\dlg_gpkg_management.py", line 132, in save_layers layer = self.project.mapLayersByName(layer_name)[0]


             IndexError: list index out of range
FLO-2DKaren commented 3 weeks ago

Test Project

Tailings Dam Project_v1.0.0.gpkg.zip

rpachaly commented 2 weeks ago

Karen, I tested here with the last master and all worked just fine. I exported the elevation rasters to tiff and added them back to the geopackage and no error arise. I did other small tests of deleting and adding back and also no error was shown.

FLO-2DKaren commented 2 weeks ago

Did you use my test project? Maybe its something in the way that data is organized. Try loading that project and then saving any elevation file to it. Maybe that gpkg is corrupt.

FLO-2DKaren commented 2 weeks ago

I'm closing this until it happens again. I'll rebuild my project and if the issue comes back up, I'll reopen this issue.