openmeteo / enhydris

A database with a web interface for the storage and management of hydro/meteorological measurements and time series
GNU Affero General Public License v3.0
18 stars 11 forks source link

enhydris.tasks.save_timeseries_data: DoesNotExist #491

Closed aptiko closed 11 months ago

aptiko commented 1 year ago
Traceback (most recent call last):
  File "/opt/enhydris-openmeteo/venv/lib/python3.9/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/enhydris-openmeteo/venv/lib/python3.9/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/enhydris-openmeteo/enhydris/tasks.py", line 67, in save_timeseries_data
    self.read_arguments(**kwargs)
  File "/opt/enhydris-openmeteo/enhydris/tasks.py", line 19, in read_arguments
    self.timeseries = Timeseries.objects.get(id=id)
  File "/opt/enhydris-openmeteo/venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/enhydris-openmeteo/venv/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
enhydris.models.timeseries.Timeseries.DoesNotExist: Timeseries matching query does not exist
aptiko commented 11 months ago

I can't reproduce this. Maybe it's some kind of race condition. The thing is, using the admin becomes seriously suboptimal, and it isn't worth trying to fix such bugs. Better write a custom data entry UI.