nens / threedi-api-qgis-client

3Di Models & Simulations plugin
https://plugins.lizard.net/
Other
2 stars 0 forks source link

Time series plotter: water quality pump meta bug #593

Closed Overmeen closed 3 months ago

Overmeen commented 3 months ago

There is a bug when using the time series plotter when switching to the water quality source (node graph).

Test data to reproduce: https://we.tl/t-T088ptvTIJ

In this case, the water quality source is 'bod'.

[AttributeError: 'Pumps' object has no attribute 'Meta' 
Traceback (most recent call last):
  File "C:\Users\Stijn.Overmeen\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\tool_graph\graph_view.py", line 582, in parameter_change
    self.graph_plot.set_parameter(self.current_parameter, time_units)
  File "C:\Users\Stijn.Overmeen\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\tool_graph\graph_view.py", line 246, in set_parameter
    item.plots(self.current_parameter["parameters"], time_units=self.current_time_units, absolute=self.absolute)
  File "C:\Users\Stijn.Overmeen\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\tool_graph\graph_model.py", line 122, in plots
    ts_table = self.timeseries_table(
  File "C:\Users\Stijn.Overmeen\AppData\Roaming\3Di\QGIS3\profiles\default/python/plugins\threedi_results_analysis\tool_graph\graph_model.py", line 152, in timeseries_table
    pump_fields = set(list(ga.pumps.Meta.composite_fields.keys()))
  File "C:\Users\Stijn.Overmeen\AppData\Roaming\3Di\QGIS3\profiles\default\python\plugins\threedi_results_analysis\deps\threedigrid\orm\base\models.py", line 194, in __getattribute__
    attr = super().__getattribute__(attr_name)
AttributeError: 'Pumps' object has no attribute 'Meta'](url)
Overmeen commented 3 months ago

duplicate of https://app.zenhub.com/workspaces/team-3di-5ef60eff1973dd0024268b90/issues/gh/nens/threedigrid/233