Riverscapes / QRAVEPlugin

QGIS Plugin for viewing Riverscapes projects
0 stars 0 forks source link

Error handling from project XML error #81

Closed jtgilbert closed 2 months ago

jtgilbert commented 1 year ago

A BRAT project.rs.xml with issues caused this error when attempting to open with QRAVE:

Traceback (most recent call last):
  File "C:\Users/jordang/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qrave_toolbar\src\qrave_toolbar.py", line 355, in projectBrowserDlg
    self.dockwidget.add_project(dialog_return[0])
  File "C:\Users/jordang/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qrave_toolbar\src\dock_widget.py", line 207, in add_project
    basename = test_project.qproject.text()
AttributeError: 'NoneType' object has no attribute 'text'`

project.rs.zip

The primary issue was the ProjectType being REALIZATION1

MattReimer commented 2 months ago

This is part of a family of bugs (related but not duplicates) that will all be closed together

MattReimer commented 2 months ago

I'm finally getting to this (sorry) and I think I just have to close it.

The XML file is trying to validate against the old schema: http://xml.riverscapes.net/Projects/XSD/V1/BRAT.xsd

but the structure is new XML.

That said, I've added better errors so that it should be a little more obvious what's going on and a little less obtuse