Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event error when deleting a variable #153

Open
clavay opened this issue Jun 19, 2024 · 0 comments
Open

event error when deleting a variable #153

clavay opened this issue Jun 19, 2024 · 0 comments

Comments

@clavay
Copy link
Collaborator

clavay commented Jun 19, 2024

When deleting a variable :

[19/Jun/2024 14:29:55] ERROR [pyscada.utils.scheduler:927] pyscada.event, unhandled exception
Traceback (most recent call last):
  File "/home/pyscada/.venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 218, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "/home/pyscada/.venv/lib/python3.9/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]
KeyError: 'variable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pyscada/.venv/lib/python3.9/site-packages/pyscada/utils/scheduler.py", line 818, in run
    status, data = self.loop()
  File "/home/pyscada/.venv/lib/python3.9/site-packages/pyscada/event/worker.py", line 24, in loop
    item.do_event_check()
  File "/home/pyscada/.venv/lib/python3.9/site-packages/pyscada/models.py", line 3039, in do_event_check
    (is_valid, var_list, vp_list) = item.is_valid()
  File "/home/pyscada/.venv/lib/python3.9/site-packages/pyscada/models.py", line 3370, in is_valid
    (in_limit, item_info) = item.in_limit()
  File "/home/pyscada/.venv/lib/python3.9/site-packages/pyscada/models.py", line 3491, in in_limit
    if self.variable is not None and self.variable.active:
  File "/home/pyscada/.venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 236, in __get__
    rel_obj = self.get_object(instance)
  File "/home/pyscada/.venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 199, in get_object
    return qs.get(self.field.get_reverse_related_filter(instance))
  File "/home/pyscada/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 637, in get
    raise self.model.DoesNotExist(
pyscada.models.Variable.DoesNotExist: Variable matching query does not exist.

[19/Jun/2024 14:29:56] DEBUG [pyscada.utils.scheduler:1049] Process pyscada.event(4152810) is stopped
[19/Jun/2024 14:30:09] DEBUG [pyscada.utils.scheduler:533] process pyscada.event started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant