Error in executing python code while assigning river layer and name to RAS PostGIS Table
Hi, I am new to RiverGIS and want to create my very first 1D River Database Table. I started off by creating a new table and selected the layers Stream Centerlines, XS Cut Lines, and Flow Path Centerlines. Then I went to Database > Import Layers Into River Database Tables and chose my river layer and river name attribute. My river layer is a shapefile with lines only, however, it is not a simple reach but includes many confluences and distributaries (it is actually a canal system, not a river). The rest of the fields I left empty and then clicked on OK. Then the following error occurred:
An error has occurred while executing Python code:
KeyError: 'StreamCenterlines' Traceback (most recent call last): File "/Users/myname/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/rivergis/dlg_rasImportDataIntoRasTables.py", line 298, in acceptDialog self.processLayers(key, data) File "/Users/myname/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/rivergis/dlg_rasImportDataIntoRasTables.py", line 280, in processLayers self.rgis.rdb.register[data['className']], KeyError: 'StreamCenterlines'
Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] QGIS version: 3.4.15-Madeira Madeira, e83d02e274
Python Path: /Applications/QGIS3.4.app/Contents/MacOS/../Resources/python /Users/myname/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/myname/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip /Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos /Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages /Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload /Applications/QGIS3.4.app/Contents/Resources/python /Applications/QGIS3.4.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7 /Users/myname/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/myname/Documents/University/TU_University/Studies/Semester_4/Msc_Thesis/QGIS_work_dir .
@lisascha can you share your data?
Hi @erpas, Yes, I am attaching it here. I have also since my post created a layer for the cross-sections and flow paths as I read that those three layers (river layer, cross-sections, and flow paths) are the minimum requirements for a table.
Thank you for your support!
Later update 07.06.2021: I have resolved my issue by avoiding the use of RiverGIS, therefore I have removed my shared data from this post.
Hi, I have the exact same issue, i'm not sure if you ever figured out how to resolve it?
Hi, I have the exact same issue, i'm not sure if you ever figured out how to resolve it?
Hi, I actually did not. I ended up redrawing the entire river network in HEC-RAS :/