Open aurjas opened 8 months ago
Internal Server Error: /datasets/X/delete/
Traceback (most recent call last):
File "/X/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/X/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/reversion/views.py", line 28, in do_revision_view
response = func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/django/contrib/auth/mixins.py", line 104, in dispatch
return super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/django/views/generic/edit.py", line 218, in post
return self.delete(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/X/vitrina/datasets/views.py", line 418, in delete
dataset.delete()
File "/X/parler/models.py", line 721, in delete
return super().delete(using)
^^^^^^^^^^^^^^^^^^^^^
File "/X/django/db/models/base.py", line 966, in delete
collector.collect([self], keep_parents=keep_parents)
File "/X/django/db/models/deletion.py", line 302, in collect
raise ProtectedError(
django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Dataset' because they are referenced through protected foreign keys: 'DatasetRelation.dataset', 'DatasetRelation.part_of'.", {<DatasetRelation: DatasetRelation object (5)>})
Pasirinkus bet kurį rinkinį https://data.gov.lt/admin/vitrina_datasets/dataset/ išmeta 500 klaidą. PVZ:Pasirinkus bet kurį rnkinį iš sąrašo - išmeta 500 klaidą. Pvz:Server Error (500) (data.gov.lt)
Susiję log'ai:
Internal Server Error: /admin/vitrina_datasets/dataset/2809/change/
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/response.py", line 83, in rendered_content
return template.render(context, self._request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 170, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 988, in render
output = self.filter_expression.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 671, in resolve
obj = self.var.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 796, in resolve
value = self._resolve_lookup(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 858, in _resolve_lookup
current = current()
^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 76, in super
return mark_safe(self.render(self.context))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 214, in render
nodelist.append(node.render_annotated(context))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 195, in render
return template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 172, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 214, in render
nodelist.append(node.render_annotated(context))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 214, in render
nodelist.append(node.render_annotated(context))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 315, in render
return nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 315, in render
return nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 994, in render
return render_value_in_context(output, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 973, in render_value_in_context
value = str(value)
^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/utils/html.py", line 376, in <lambda>
klass.__str__ = lambda self: mark_safe(klass_str(self))
^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/boundfield.py", line 34, in __str__
return self.as_widget()
^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/boundfield.py", line 93, in as_widget
return widget.render(
^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/widgets.py", line 246, in render
context = self.get_context(name, value, attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/contrib/admin/widgets.py", line 283, in get_context
'rendered_widget': self.widget.render(name, value, attrs),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/widgets.py", line 246, in render
context = self.get_context(name, value, attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/widgets.py", line 707, in get_context
context = super().get_context(name, value, attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/widgets.py", line 668, in get_context
context['widget']['optgroups'] = self.optgroups(name, context['widget']['value'], attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/widgets.py", line 616, in optgroups
for index, (option_value, option_label) in enumerate(self.choices):
File "/opt/venv/lib/python3.11/site-packages/django/forms/models.py", line 1170, in __iter__
yield self.choice(obj)
^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/models.py", line 1184, in choice
self.field.label_from_instance(obj),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/forms/models.py", line 1253, in label_from_instance
return str(obj)
^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/vitrina/datasets/models.py", line 995, in __str__
if self.dataset.metadata.first():
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'metadata'
Internal Server Error: /user/profile/160/
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/response.py", line 83, in rendered_content
return template.render(context, self._request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 170, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/classytags/core.py", line 142, in render
return str(self.render_tag(context, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/sekizai/templatetags/sekizai_tags.py", line 87, in render_tag
rendered_contents = nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/classytags/core.py", line 142, in render
return str(self.render_tag(context, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/cms/templatetags/cms_tags.py", line 434, in render_tag
return toolbar.render_with_structure(context, nodelist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/cms/toolbar/toolbar.py", line 477, in render_with_structure
rendered_contents = nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 214, in render
nodelist.append(node.render_annotated(context))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/template/defaulttags.py", line 449, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/urls/base.py", line 86, in reverse
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/django/urls/resolvers.py", line 698, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'unsubscribe' with arguments '('', None, 160)' not found. 1 pattern(s) tried: ['unsubscribe/(?P<content_type_id>[0-9]+)/(?P<obj_id>[0-9]+)/(?P<user_id>[0-9]+)/\\Z']
Norint pašalinti rinkinį https://data.gov.lt/datasets/2556/delete/ metama klaida 500. Klaida metama ne tik su šiuo rinkiniu, yra ir daugiau, kuriuos nori Registrų centras trinti, bet meta tą pačią klaidą.
Taip pat, 500 klaida metama testinėje aplinkoje paspaudus Aurimas Jasiūnas -> "Profilis", https://test.data.gov.lt/user/profile/160/.