Riverscapes / QRAVEPlugin

QGIS Plugin for viewing Riverscapes projects
GNU General Public License v3.0
0 stars 0 forks source link

Missing Path node causes confusing error #51

Closed MattReimer closed 2 years ago

MattReimer commented 3 years ago

More business logic stuff. When the <Path> node can't be found it barfs out a bad error which is hard to decipher

2021-09-08T12:02:22     CRITICAL    Exception 'NoneType' object has no attribute 'text'

             Trace: Traceback (most recent call last):
              File "C:\Users/Matt/AppData/Roaming/QGIS/QGIS3\profiles\debug/python/plugins\qrave_toolbar_dev\src\classes\project.py", line 49, in load
              self._build_tree()
              File "C:\Users/Matt/AppData/Roaming/QGIS/QGIS3\profiles\debug/python/plugins\qrave_toolbar_dev\src\classes\project.py", line 139, in _build_tree
              self.qproject = self._recurse_tree()
              File "C:\Users/Matt/AppData/Roaming/QGIS/QGIS3\profiles\debug/python/plugins\qrave_toolbar_dev\src\classes\project.py", line 230, in _recurse_tree
              self._recurse_tree(child_node, new_proj_el, curr_item)
              File "C:\Users/Matt/AppData/Roaming/QGIS/QGIS3\profiles\debug/python/plugins\qrave_toolbar_dev\src\classes\project.py", line 268, in _recurse_tree
              layer_path = new_proj_el.find('Path')
             AttributeError: 'NoneType' object has no attribute 'text'
MattReimer commented 3 years ago

Should be resolved. Test before release.