I have mysql version 8 installed mysql-8.0.18-winx64
When I have migrate command done, it shows following error
python app.py db migrate
Traceback (most recent call last):
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1193, "Unknown system variable 'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 44, in
manager.run()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 386, in handle
res = handle(*args, **config)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script\commands.py", line 216, in call
return self.run(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 95, in wrapped
f(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 215, in migrate
version_path=version_path, rev_id=rev_id)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\command.py", line 214, in revision
script_directory.run_env()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\script\base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "migrations\env.py", line 96, in
run_migrations_online()
File "migrations\env.py", line 81, in run_migrations_online
with connectable.connect() as connection:
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2091, in connect
return self._connection_cls(self, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 90, in init
if connection is not None else engine.raw_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2177, in raw_connection
self.pool.unique_connection, _connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1193, "Unknown system variable 'tx_isolation'")
(env) C:\sources\Demo\Demo_api>python app.py db stamp head
Traceback (most recent call last):
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1193, "Unknown system variable 'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 44, in
manager.run()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 386, in handle
res = handle(*args, **config)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script\commands.py", line 216, in call
return self.run(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 95, in wrapped
f(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 412, in stamp
command.stamp(config, revision, sql=sql, tag=tag)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\command.py", line 579, in stamp
script.run_env()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\script\base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "migrations\env.py", line 96, in
run_migrations_online()
File "migrations\env.py", line 81, in run_migrations_online
with connectable.connect() as connection:
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2091, in connect
return self._connection_cls(self, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 90, in init
if connection is not None else engine.raw_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2177, in raw_connection
self.pool.unique_connection, _connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1193, "Unknown system variable 'tx_isolation'")
(env) C:\sources\Demo\Demo_api>python app.py db upgrade
Traceback (most recent call last):
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1193, "Unknown system variable 'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 44, in
manager.run()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 386, in handle
res = handle(*args, **config)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script\commands.py", line 216, in call
return self.run(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 95, in wrapped
f(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 280, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\command.py", line 298, in upgrade
script.run_env()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\script\base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "migrations\env.py", line 96, in
run_migrations_online()
File "migrations\env.py", line 81, in run_migrations_online
with connectable.connect() as connection:
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2091, in connect
return self._connection_cls(self, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 90, in init
if connection is not None else engine.raw_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2177, in raw_connection
self.pool.unique_connection, _connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1193, "Unknown system variable 'tx_isolation'")
(env) C:\sources\Demo\Demo_api>python app.py db stamp head
Traceback (most recent call last):
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1193, "Unknown system variable 'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 44, in
manager.run()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 386, in handle
res = handle(*args, **config)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script\commands.py", line 216, in call
return self.run(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 95, in wrapped
f(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 412, in stamp
command.stamp(config, revision, sql=sql, tag=tag)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\command.py", line 579, in stamp
script.run_env()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\script\base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "migrations\env.py", line 96, in
run_migrations_online()
File "migrations\env.py", line 81, in run_migrations_online
with connectable.connect() as connection:
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2091, in connect
return self._connection_cls(self, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 90, in init
if connection is not None else engine.raw_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2177, in raw_connection
self.pool.unique_connection, _connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1193, "Unknown system variable 'tx_isolation'")
(env) C:\sources\Demo\Demo_api>python app.py db migrate
Traceback (most recent call last):
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1193, "Unknown system variable 'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 44, in
manager.run()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script_init_.py", line 386, in handle
res = handle(*args, **config)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_script\commands.py", line 216, in call
return self.run(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 95, in wrapped
f(*args, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\flask_migrate_init_.py", line 215, in migrate
version_path=version_path, rev_id=rev_id)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\command.py", line 214, in revision
script_directory.run_env()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\script\base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\alembic\util\compat.py", line 173, in load_module_py
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "migrations\env.py", line 96, in
run_migrations_online()
File "migrations\env.py", line 81, in run_migrations_online
with connectable.connect() as connection:
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2091, in connect
return self._connection_cls(self, **kwargs)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 90, in init
if connection is not None else engine.raw_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2177, in raw_connection
self.pool.unique_connection, _connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
e, dialect, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
exc_info
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
return fn()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
rec = pool._do_get()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
return self._create_connection()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 461, in init
self.__connect(first_connect_check=True)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\pool.py", line 661, in __connect
exec_once(self.connection, self)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 246, in exec_once
self(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\event\attr.py", line 256, in call
fn(*args, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1331, in go
return once_fn(*arg, **kw)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\strategies.py", line 181, in first_connect
dialect.initialize(c)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1714, in initialize
default.DefaultDialect.initialize(self, connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\engine\default.py", line 256, in initialize
self.get_isolation_level(connection.connection)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1569, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 170, in execute
result = self._query(query)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\cursors.py", line 328, in _query
conn.query(q)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 732, in _read_query_result
result.read()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\connections.py", line 684, in _read_packet
packet.check_error()
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "C:\sources\Demo\Demo_api\env\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1193, "Unknown system variable 'tx_isolation'")