Bug #942
closedServer 500 Error after wrong date input at Actor/Person
Description
I had a wrong date input: 1015/04/31 --> 31 is wrong. I saved it and normaly a error message appears. In the productive DPP OA it functions without problems. But at my private project there was a problem. Maybe it needs further investigation?!
Apache error log:
[Fri Sep 28 13:42:58.060223 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] [2018-09-28 13:42:58,053] ERROR in app: Exception on /actor/insert/E21 [POST], referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060370 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] Traceback (most recent call last):, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060386 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/app.py", line 1982, in wsgi_app, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060398 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] response = self.full_dispatch_request(), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060409 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/app.py", line 1614, in full_dispatch_request, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060421 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] rv = self.handle_user_exception(e), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060432 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/app.py", line 1517, in handle_user_exception, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060443 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] reraise(exc_type, exc_value, tb), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060455 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060536 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] raise value, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060550 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/app.py", line 1612, in full_dispatch_request, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060565 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] rv = self.dispatch_request(), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060579 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/app.py", line 1598, in dispatch_request, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060594 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return self.view_functions[rule.endpoint](**req.view_args), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060608 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/util/util.py", line 347, in wrapped, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060622 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return f(*args, **kwargs), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060634 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/views/actor.py", line 188, in actor_insert, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060644 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return render_template('actor/insert.html', form=form, code=code, origin=origin), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060655 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/templating.py", line 134, in render_template, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060665 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] context, ctx.app), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060674 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/flask/templating.py", line 116, in _render, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060684 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] rv = template.render(context), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060693 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 989, in render, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060703 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return self.environment.handle_exception(exc_info, True), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060713 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 754, in handle_exception, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060723 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] reraise(exc_type, exc_value, tb), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060733 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060742 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] raise value.with_traceback(tb), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060752 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/templates/actor/insert.html", line 1, in top-level template code, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060772 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] {% extends 'layout.html' %}, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060782 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/templates/layout.html", line 130, in top-level template code, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060792 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] <div style="float:left">{% block content %}{% endblock %}</div>, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060802 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/templates/actor/insert.html", line 12, in block "content", referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060812 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] {{ form|display_form('Person', True if code=='E21' else False)|safe }}, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060822 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/util/filters.py", line 224, in display_form, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060832 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] field=str(field(class_=class_)) + errors), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060842 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/wtforms/fields/core.py", line 153, in __call__, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060851 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return self.meta.render_field(self, kwargs), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060885 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/usr/lib/python3/dist-packages/wtforms/meta.py", line 56, in render_field, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060897 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] return field.widget(field, **render_kw), referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060906 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] File "/var/www/html/dsa/openatlas/forms/forms.py", line 162, in __call__, referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060916 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] selection += g.nodes[entity_id].name + '<br />', referer: http://dsa.koschigel.de/actor/insert/E21
[Fri Sep 28 13:42:58.060931 2018] [wsgi:error] [pid 3887] [client 193.170.91.36:51840] KeyError: '[', referer: http://dsa.koschigel.de/actor/insert/E21
Updated by Bernhard Koschiček-Krombholz about 6 years ago
After second try, the error message appears.
Updated by Alexander Watzinger about 6 years ago
- Category set to Backend
- Status changed from New to Acknowledged
- Assignee set to Bernhard Koschiček-Krombholz
This looks strange indeed, the error triggers at the TreeMultiSelect creation which has nothing to do with dates.
My best guess is that you haven't installed the numpy library:
apt-get install python3-numpy
Please report if this was the case.
Also I'll add a ticket to check installed libraries to identify these kind of problems faster.
Updated by Alexander Watzinger about 6 years ago
- Status changed from Acknowledged to Closed
- Assignee changed from Bernhard Koschiček-Krombholz to Alexander Watzinger
- Target version set to 3.10.0
I managed to reproduce this bug, it seems that something at the form validation goes wrong when there is an already invalid date saved.
Fixed in 3.10.0