Open-MSS / MSS

A QT application, a OGC web map server, a collaboration server to plan atmospheric research flights.
https://open-mss.github.io
Apache License 2.0
56 stars 69 forks source link

check also existing data on loading an operation #2484

Open ReimarBauer opened 3 weeks ago

ReimarBauer commented 3 weeks ago

A wrong dataset gives in 9.2.0 and needs maybe a similar fix as for https://github.com/Open-MSS/MSS/issues/2456

Fatal error in MSS 9.2.0 on Linux-6.5.0-10043-tuxedo-x86_64-with-glibc2.35
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0]

Please report bugs in MSS to https://github.com/Open-MSS/MSS

Information about the fatal error:

Traceback (most recent call last):
  File "/home/reimar/Miniforge/envs/mssenv9.2.0/lib/python3.11/site-packages/mslib/msui/mscolab.py", line 1772, in set_active_op_id
    self.load_wps_from_server()
  File "/home/reimar/Miniforge/envs/mssenv9.2.0/lib/python3.11/site-packages/mslib/msui/mscolab.py", line 1911, in load_wps_from_server
    self.waypoints_model = ft.WaypointsTableModel(xml_content=xml_content)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/reimar/Miniforge/envs/mssenv9.2.0/lib/python3.11/site-packages/mslib/msui/flighttrack.py", line 202, in __init__
    self.load_from_xml_data(xml_content)
  File "/home/reimar/Miniforge/envs/mssenv9.2.0/lib/python3.11/site-packages/mslib/msui/flighttrack.py", line 657, in load_from_xml_data
    raise SyntaxError(f"Invalid flight track filename: {name}")
SyntaxError: Invalid flight track filename: Flight track
ReimarBauer commented 3 weeks ago

We maybe better should filter them on the server and not add them to the operation list. e.g. collect in some different list, disable them, define an invalid attribute in the dbase, write a log entry. So that only 1 request is needed.

Would we do only a similiar fix as mentioned above they are still in the operation list. In the UI there of course we can use the same check and use a popup message when a user activates such an incomplete dataset but we have then to undo the activation too.