Riverscapes / QRAVEPlugin

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

Loading project with XML error doesn't throw any warning message #123

Closed jtgilbert closed 2 months ago

jtgilbert commented 2 months ago

The project doesn't open, but also doesn't give an error message or cause any other behavior.

The XML has the project level tag removed.

just xml here whole project here

MattReimer commented 2 months ago

Hey @jtgilbert when I load this project I see:

2024-05-08T10:48:24     CRITICAL    Error loading project: Project: /Users/matt/Downloads/1701020302_headwaters_final/project.rs.xml
              (See Riverscapes Viewer logs for specifics)
2024-05-08T10:48:24     CRITICAL    Exception Opening and ending tag mismatch: MetaData line 43 and MetData, line 46, column 42 (project.rs.xml, line 46)

             Trace: Traceback (most recent call last):
              File "/Users/matt/Library/Application Support/QGIS/QGIS3/profiles/developer/python/plugins/qrave_toolbar_dev/src/classes/project.py", line 56, in load
              self._load_project()
              File "/Users/matt/Library/Application Support/QGIS/QGIS3/profiles/developer/python/plugins/qrave_toolbar_dev/src/classes/project.py", line 88, in _load_project
              self.project = lxml.etree.parse(self.project_xml_path).getroot()
              File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
              File "src/lxml/parser.pxi", line 1859, in lxml.etree._parseDocument
              File "src/lxml/parser.pxi", line 1885, in lxml.etree._parseDocumentFromURL
              File "src/lxml/parser.pxi", line 1789, in lxml.etree._parseDocFromFile
              File "src/lxml/parser.pxi", line 1177, in lxml.etree._BaseParser._parseDocFromFile
              File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
              File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
              File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
              File "/Users/matt/Downloads/1701020302_headwaters_final/project.rs.xml", line 46
             lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: MetaData line 43 and MetData, line 46, column 42

2024-05-08T10:48:24     WARNING    Error loading project: /Users/matt/Downloads/1701020302_headwaters_final/project.rs.xml

I feel like this is a pretty clear error but maybe I'm not understanding. Can you verify this behaviour?

MattReimer commented 2 months ago

There was a small issue that was preventing the messagebar (that annoying red and green banner that pops up at the top of the map) from working correctly. That has been fixed.

@jtgilbert I'd still like you to confirm that you're seeing the errors above though.

jtgilbert commented 2 months ago

@MattReimer Do you have a new zip with the change?

MattReimer commented 2 months ago

Your wish is my command:

riverscapes_viewer-0_9_2.zip

jtgilbert commented 2 months ago

Confirmed, the error shows up now.