When the layer is read by the time series widget, it cannot handle it when the path is non-existent, or the data is empty. Non-existent gives the following error.
An error has occurred while executing Python code:
AttributeError: 'NoneType' object has no attribute 'GetLayer'
Traceback (most recent call last):
File "C:\Users/X/Source/Repos/Ribasim/.pixi/env/Library/./python/plugins\imodqgis\imod_plugin.py", line 132, in toggle_timeseries
widget = ImodTimeSeriesWidget(self.timeseries_widget, self.iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/X/Source/Repos/Ribasim/.pixi/env/Library/./python/plugins\imodqgis\timeseries\timeseries_widget.py", line 284, in __init__
self.on_layer_changed()
File "C:\Users/X/Source/Repos/Ribasim/.pixi/env/Library/./python/plugins\imodqgis\timeseries\timeseries_widget.py", line 464, in on_layer_changed
self.load_arrow_data(layer)
File "C:\Users/X/Source/Repos/Ribasim/.pixi/env/Library/./python/plugins\imodqgis\timeseries\timeseries_widget.py", line 548, in load_arrow_data
df = read_arrow(arrow_path)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/X/Source/Repos/Ribasim/.pixi/env/Library/./python/plugins\imodqgis\arrow\reading.py", line 7, in read_arrow
layer = dataset.GetLayer(0)
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetLayer'
Python version: 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:29:11) [MSC v.1935 64 bit (AMD64)]
QGIS version: 3.28.12-Firenze Firenze, exported
I have a layer where the elements contain an
arrow_path
that I put in via python.When the layer is read by the time series widget, it cannot handle it when the path is non-existent, or the data is empty. Non-existent gives the following error.