User:Jayprakash12345/Wikifile-tranfser error

[2023-11-05 13:31:44,486] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 713, in _write_bytes
    self._sock.sendall(data)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context
    cursor, statement, parameters, context
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 771, in _execute_command
    self._write_bytes(packet)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 718, in _write_bytes
    "MySQL server has gone away (%r)" % (e,))
pymysql.err.OperationalError: (2006, "MySQL server has gone away (ConnectionResetError(104, 'Connection reset by peer'))")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "app.py", line 84, in index
    if (logged() is not None) and ( db_user() is not None):
  File "app.py", line 248, in db_user
    user = User.query.filter_by(username=MW_OAUTH.get_current_user(True)).first()
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3375, in first
    ret = list(self[0:1])
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3149, in __getitem__
    return list(res)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3481, in __iter__
    return self._execute_and_instances(context)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3506, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1020, in execute
    return meth(self, multiparams, params)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_clauseelement
    distilled_params,
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1324, in _execute_context
    e, statement, parameters, cursor, context
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1518, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
    raise exception
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context
    cursor, statement, parameters, context
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 771, in _execute_command
    self._write_bytes(packet)
  File "/data/project/wikifile-transfer/www/python/venv/lib/python3.7/site-packages/pymysql/connections.py", line 718, in _write_bytes
    "MySQL server has gone away (%r)" % (e,))
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2006, "MySQL server has gone away (ConnectionResetError(104, 'Connection reset by peer'))")
[SQL: SELECT user.id AS user_id, user.username AS user_username, user.pref_project AS user_pref_project, user.pref_language AS user_pref_language, user.user_language AS user_user_language
FROM user
WHERE user.username = %(username_1)s
 LIMIT %(param_1)s]
[parameters: {'username_1': 'சா அருணாசலம்', 'param_1': 1}]
(Background on this error at: http://sqlalche.me/e/e3q8)