Ошибка при запуске airflow scheduler: sqlalchemy.exc.ArgumentError: Invalid value for 'executemany_mode': 'values'

Мне нужна помощь. Ошибка запуска планировщика Airflow. Airflow установлен без докера.

Версия Python: 3.10 Версия Airflow: 2.7.3 Версия SQLAlchemy: 2.0.28 Ubuntu 22.04 postgreSQL 14.11

Довольно долго всё работало нормально, но два дня назад планировщик начал выдавать ошибку:

systemd[1]: Started Airflow scheduler daemon.
airflow[8752]: Traceback (most recent call last):
airflow[8752]:   File "/usr/local/bin/airflow", line 5, in <module>
airflow[8752]:     from airflow.__main__ import main
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/airflow/__init__.py", line 68, in <module>
airflow[8752]:     settings.initialize()
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/airflow/settings.py", line 546, in initialize
airflow[8752]:     configure_orm()
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/airflow/settings.py", line 242, in configure_or
m
airflow[8752]:     engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args, future=T
rue)
airflow[8752]:   File "<string>", line 2, in create_engine
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/util/deprecations.py", line 281, in
warned
airflow[8752]:     return fn(*args, **kwargs)  # type: ignore[no-any-return]
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/create.py", line 612, in crea
te_engine
airflow[8752]:     dialect = dialect_cls(**dialect_args)
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/dialects/postgresql/psycopg2.py", li
ne 653, in __init__
airflow[8752]:     self.executemany_mode = parse_user_argument_for_enum(
airflow[8752]:   File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/util/langhelpers.py", line 1734, in
parse_user_argument_for_enum
airflow[8752]:     raise exc.ArgumentError(f"Invalid value for '{name}': {arg!r}")
airflow[8752]: sqlalchemy.exc.ArgumentError: Invalid value for 'executemany_mode': 'values'
systemd[1]: airflow-scheduler.service: Main process exited, code=exited, status=1/FAIL
URE
systemd[1]: airflow-scheduler.service: Failed with result 'exit-code'.

:~# airflow config print:

Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 5, in <module>
    from airflow.__main__ import main
  File "/usr/local/lib/python3.10/dist-packages/airflow/__init__.py", line 68, in <module>
    settings.initialize()
  File "/usr/local/lib/python3.10/dist-packages/airflow/settings.py", line 546, in initialize
    configure_orm()
  File "/usr/local/lib/python3.10/dist-packages/airflow/settings.py", line 242, in configure_orm
    engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args, future=True)
  File "<string>", line 2, in create_engine
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/util/deprecations.py", line 281, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/create.py", line 697, in create_engine
    raise TypeError(
TypeError: Invalid argument(s) 'encoding' sent to create_engine(), using configuration SQLiteDialect_pysqlite/QueuePool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.

Executemany_mode в конфиге не указан, даги и пользовательские файлы удалил. Переменная $AIRFLOW_HOME, похоже, не имеет к этому никакого отношения. ошибка сохраняется.

Может кто знает как это исправить?


Ответы (0 шт):