osm-wikidata
osm-wikidata copied to clipboard
TypeError: Object of type method is not JSON serializable
URL: https://osm.wikidata.link/candidates/relation/51805
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/srv/osm-wikidata/matcher/view.py", line 855, in candidates return render_template( File "/usr/lib/python3/dist-packages/flask/templating.py", line 147, in render_template return _render( File "/usr/lib/python3/dist-packages/flask/templating.py", line 128, in _render rv = template.render(context) File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1291, in render self.environment.handle_exception() File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 925, in handle_exception raise rewrite_traceback_stack(source=source) File "/srv/osm-wikidata/matcher/templates/candidates.html", line 6, in top-level template code Run matcher again File "/srv/osm-wikidata/matcher/templates/base_no_jquery.html", line 36, in top-level template code {% block script %}{% endblock %} File "/srv/osm-wikidata/matcher/templates/candidates.html", line 52, in block 'script' const user_is_authenticated = {{ g.user.is_authenticated | tojson }}; File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 1673, in do_tojson return htmlsafe_json_dumps(value, dumps=dumps, **kwargs) File "/usr/lib/python3/dist-packages/jinja2/utils.py", line 739, in htmlsafe_json_dumps dumps(obj, **kwargs) File "/usr/lib/python3/dist-packages/flask/json/init.py", line 139, in dumps rv = _json.dumps(obj, **kwargs) File "/usr/lib/python3.10/json/init.py", line 238, in dumps **kw).encode(obj) File "/usr/lib/python3.10/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/lib/python3/dist-packages/flask/json/init.py", line 57, in default return super().default(o) File "/usr/lib/python3.10/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.class.name} ' TypeError: Object of type method is not JSON serializable