WebarchivCZ / Seeder

Seeder - Czech webarchive curating tool and public site
MIT License
15 stars 2 forks source link

seeder/admin topic collections err 500 #448

Closed kvasnicaj closed 6 years ago

kvasnicaj commented 6 years ago

při kliknutí na jakoukoliv tematickou kolekci v administraci to hodí 500.

např.

https://seeder.webarchiv.cz/seeder/admin/harvests/topiccollection/1/change/

Visgean commented 6 years ago

https://sentry.webarchiv.cz/sentry/seeder/ ja to v sentry nevidim :(

kvasnicaj commented 6 years ago

já se taky divil, že to v sentry není. Tobě to funguje?

Visgean commented 6 years ago

Na localu ano

kvasnicaj commented 6 years ago

Já tu chybul zkusil vyvolat na testovacím a hodilo to tohle:

` KeyError at /seeder/admin/harvests/topiccollection/1/change/ "Key 'slug' not found in 'TopicCollectionForm'. Choices are: active, all_open, annotation_cs, annotation_en, auto_created, custom_seeds, custom_sources, date_from, date_to, image, keywords, owner, scheduled_on, seeds_frozen, status, target_frequency, title_cs, title_en."

Request Method: GET

http://10.3.0.120/seeder/admin/harvests/topiccollection/1/change/ 1.10.4 KeyError "Key 'slug' not found in 'TopicCollectionForm'. Choices are: active, all_open, annotation_cs, annotation_en, auto_created, custom_seeds, custom_sources, date_from, date_to, image, keywords, owner, scheduled_on, seeds_frozen, status, target_frequency, title_cs, title_en." /opt/virtualenv/seeder/lib/python3.4/site-packages/django/forms/forms.py in getitem, line 150 /usr/sbin/uwsgi 3.4.5 ['/opt/Seeder/Seeder/', '.', '', '/opt/virtualenv/seeder/lib64/python34.zip', '/opt/virtualenv/seeder/lib64/python3.4', '/opt/virtualenv/seeder/lib64/python3.4/plat-linux', '/opt/virtualenv/seeder/lib64/python3.4/lib-dynload', '/usr/lib64/python3.4', '/usr/lib/python3.4', '/opt/virtualenv/seeder/lib/python3.4/site-packages'] út, 31 Říj 2017 13:06:34 +0000 `

`Environment:

Request Method: GET Request URL: http://10.3.0.120/seeder/admin/harvests/topiccollection/1/change/

Django Version: 1.10.4 Python Version: 3.4.5 Installed Applications: ('raven.contrib.django.raven_compat', 'dal', 'dal_select2', 'modeltranslation', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.contrib.postgres', 'django_tables2', 'django_filters', 'bootstrap3', 'mptt', 'formtools', 'reversion', 'ckeditor', 'ckeditor_uploader', 'django_crontab', 'sorl.thumbnail', 'rest_framework', 'rest_framework.authtoken', 'core', 'publishers', 'source', 'voting', 'comments', 'contracts', 'legacy_db', 'harvests', 'blacklists', 'qa', 'www', 'search_blob') Installed Middleware: ('raven.contrib.django.middleware.SentryMiddleware', 'reversion.middleware.RevisionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.middleware.locale.LocaleMiddleware')

Traceback:

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/forms/forms.py" in getitem

  1. field = self.fields[name]

During handling of the above exception ('slug'), another exception occurred:

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/core/handlers/base.py" in _legacy_get_response

  1. response = self._get_response(request)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/options.py" in wrapper

  1. return self.admin_site.admin_view(view)(*args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/sites.py" in inner

  1. return view(request, *args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/options.py" in change_view

  1. return self.changeform_view(request, object_id, form_url, extra_context)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapper

  1. return bound_func(*args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view

  1. response = view_func(request, *args, **kwargs)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/utils/decorators.py" in bound_func

  1. return func.get(self, type(self))(*args2, **kwargs2)

File "/usr/lib64/python3.4/contextlib.py" in inner

  1. return func(*args, **kwds)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/options.py" in changeform_view

  1. model_admin=self)

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/helpers.py" in init

  1. } for field_name, dependencies in prepopulated_fields.items()]

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/contrib/admin/helpers.py" in

  1. } for field_name, dependencies in prepopulated_fields.items()]

File "/opt/virtualenv/seeder/lib/python3.4/site-packages/django/forms/forms.py" in getitem

  1. ', '.join(sorted(f for f in self.fields)),

Exception Type: KeyError at /seeder/admin/harvests/topiccollection/1/change/ Exception Value: "Key 'slug' not found in 'TopicCollectionForm'. Choices are: active, all_open, annotation_cs, annotation_en, auto_created, custom_seeds, custom_sources, date_from, date_to, image, keywords, owner, scheduled_on, seeds_frozen, status, target_frequency, title_cs, title_en." `

Visgean commented 6 years ago

To je zvlastni, ja vubec nemam tyhle url, pro seznam collections mam http://127.0.0.1:8000/seeder/harvests/collections pro detail: http://127.0.0.1:8000/seeder/harvests/1/collection_detail a pro edit http://127.0.0.1:8000/seeder/harvests/1/collection_edit

kvasnicaj commented 6 years ago

Jo tohle je ale v adminu, tam kde spravuješ třeba uživatelské účty :)

Visgean commented 6 years ago

:D aha ok, no tak to je jedno, ne? ja ani nevim proc v tom adminu ty topic collections jsou. oni by tam imho spravne byt nemeli.

kvasnicaj commented 6 years ago

no oni tam jsou asi hlavně, protože jedině z adminu jdou smazat, což je fajn, to bych tak nechal :) jinak to asi jedno je, ale i tak bych to chtělo nějak opravit, třeba je udělat neproklikávací :)