Closed martinantonmueller closed 4 years ago
This bug I have fixed already but it seems that my changes were not pushed to production. The relevant commit is: 7c7d6615 in master https://gitlab.com/acdh-oeaw/apis/apis-core/commit/7c7d66150e2142975aa72f0f49bcc821d2bdfb7d
pushed now and running; closing
I try to find all Schnitzlers that are related to Munich.
Browse Person > Name or Label of person > "Schnitzler" and >related entity > "München" gives me the following error:
Environment:
Request Method: GET Request URL: https://pmb.acdh.oeaw.ac.at/apis/entities/entity/person/list/?name=schnitzler&gender=&start_date_after=&start_date_before=&end_date_after=&end_date_before=&profession=&title=&related_entity_name=m%C3%BCnchen&related_relationtype_name=&Filter=Filter
Django Version: 2.1.2 Python Version: 3.6.8 Installed Applications: ['dal', 'dal_select2', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'reversion', 'reversion_compare', 'crispy_forms', 'django_filters', 'django_tables2', 'rest_framework', 'webpage', 'browsing', 'django_extensions', 'apis_core.apis_entities', 'apis_core.apis_metainfo', 'apis_core.apis_relations', 'apis_core.apis_vocabularies', 'apis_core.apis_labels', 'rest_framework.authtoken', 'rest_framework_swagger', 'drf_yasg', 'guardian', 'charts', 'infos'] Installed Middleware: ['corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'reversion.middleware.RevisionMiddleware']
Traceback:
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/mysql/base.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/cursors.py" in _query
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/connections.py" in query
The above exception ((1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION (SELECT
apis_metainfo_tempentityclass
.id
, `apis_metainfo_tempentitycla' at line 1")) was the direct cause of the following exception:File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/views/generic/base.py" in view
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/contrib/auth/mixins.py" in dispatch
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/views/generic/list.py" in get
File "/var/www/html/apis-webpage-base/apis_core/apis_entities/views.py" in get_context_data
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django_tables2/views.py" in get_context_data
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/views/generic/list.py" in get_context_data
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/views/generic/list.py" in paginate_queryset
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/paginator.py" in page
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/paginator.py" in validate_number
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/utils/functional.py" in get
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/paginator.py" in num_pages
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/utils/functional.py" in get
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/core/paginator.py" in count
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/models/query.py" in count
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/models/sql/query.py" in get_count
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/models/sql/query.py" in get_aggregation
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute_with_wrappers
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/utils.py" in exit
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/django/db/backends/mysql/base.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/cursors.py" in _query
File "/var/www/html/apis-webpage-base/myenv/lib/python3.6/site-packages/MySQLdb/connections.py" in query
Exception Type: ProgrammingError at /apis/entities/entity/person/list/ Exception Value: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION (SELECT
apis_metainfo_tempentityclass
.id
, `apis_metainfo_tempentitycla' at line 1")