Oct 26 23:19:55 Neurohost python3[2273106]: KeyError: 'HTTP_USER_AGENT'
Oct 26 23:19:55 Neurohost python3[2273106]: During handling of the above exception, another exception occurred:
Oct 26 23:19:55 Neurohost python3[2273106]: Traceback (most recent call last):
Oct 26 23:19:55 Neurohost python3[2273106]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 891, in finalize_request
Oct 26 23:19:55 Neurohost python3[2273106]: response = self.process_response(response)
Oct 26 23:19:55 Neurohost python3[2273106]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1267, in process_response
Oct 26 23:19:55 Neurohost python3[2273106]: response = self.ensure_sync(func)(response)
Oct 26 23:19:55 Neurohost python3[2273106]: File "/usr/local/lib/python3.10/dist-packages/api_analytics/flask.py", line 24, in on_finish
Oct 26 23:19:55 Neurohost python3[2273106]: 'user_agent': request.headers['user-agent'],
Oct 26 23:19:55 Neurohost python3[2273106]: File "/usr/local/lib/python3.10/dist-packages/werkzeug/datastructures/headers.py", line 493, in __getitem__
Oct 26 23:19:55 Neurohost python3[2273106]: return self.environ[f"HTTP_{key}"]
Oct 26 23:19:55 Neurohost python3[2273106]: KeyError: 'HTTP_USER_AGENT'
In my server logs I see this error very often. If I disable analytics - the error disappears, everything works as it should.
In my server logs I see this error very often. If I disable analytics - the error disappears, everything works as it should.