You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/09 07:14:17 UTC

[GitHub] [airflow] Avphy commented on issue #10954: Serialized Dags with MySQL Latin1 encoded airflow db

Avphy commented on issue #10954:
URL: https://github.com/apache/airflow/issues/10954#issuecomment-1375193978

   We are also facing similar error with Arabic text in DAG file, did anybody find solution to this issue?
   
   `2023-01-09_05:55:04.23124 Process DagFileProcessor9-Process:
   2023-01-09_05:55:04.23138 Traceback (most recent call last):
   2023-01-09_05:55:04.23144   File "/opt/rh/rh-python38/root/usr/lib64/python3.8/multiprocessing/process.py", line 315, in _bootstrap
   2023-01-09_05:55:04.23148     self.run()
   2023-01-09_05:55:04.23151   File "/opt/rh/rh-python38/root/usr/lib64/python3.8/multiprocessing/process.py", line 108, in run
   2023-01-09_05:55:04.23155     self._target(*self._args, **self._kwargs)
   2023-01-09_05:55:04.23158   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/dag_processing/processor.py", line 155, in _run_file_processor
   2023-01-09_05:55:04.23162     result: Tuple[int, int] = dag_file_processor.process_file(
   2023-01-09_05:55:04.23166   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/utils/session.py", line 71, in wrapper
   2023-01-09_05:55:04.23171     return func(*args, session=session, **kwargs)
   2023-01-09_05:55:04.23175   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/dag_processing/processor.py", line 660, in process_file
   2023-01-09_05:55:04.23179     dagbag.sync_to_db()
   2023-01-09_05:55:04.23183   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/utils/session.py", line 71, in wrapper
   2023-01-09_05:55:04.23187     return func(*args, session=session, **kwargs)
   2023-01-09_05:55:04.23192   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/models/dagbag.py", line 615, in sync_to_db
   2023-01-09_05:55:04.23196     for attempt in run_with_db_retries(logger=self.log):
   2023-01-09_05:55:04.23199   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/tenacity/__init__.py", line 382, in __iter__
   2023-01-09_05:55:04.23203     do = self.iter(retry_state=retry_state)
   2023-01-09_05:55:04.23207   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/tenacity/__init__.py", line 349, in iter
   2023-01-09_05:55:04.23211     return fut.result()
   2023-01-09_05:55:04.23215   File "/opt/rh/rh-python38/root/usr/lib64/python3.8/concurrent/futures/_base.py", line 437, in result
   2023-01-09_05:55:04.23220     return self.__get_result()
   2023-01-09_05:55:04.23224   File "/opt/rh/rh-python38/root/usr/lib64/python3.8/concurrent/futures/_base.py", line 389, in __get_result
   2023-01-09_05:55:04.23228     raise self._exception
   2023-01-09_05:55:04.23237   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/models/dagbag.py", line 629, in sync_to_db
   2023-01-09_05:55:04.23241     DAG.bulk_write_to_db(self.dags.values(), session=session)
   2023-01-09_05:55:04.23250   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/utils/session.py", line 68, in wrapper
   2023-01-09_05:55:04.23255     return func(*args, **kwargs)
   2023-01-09_05:55:04.23259   File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/airflow/models/dag.py", line 2474, in bulk_write_to_db
   2023-01-09_05:55:04.23263     session.flush()
   2023-01-09_05:55:04.23267   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", line 3255, in flush
   2023-01-09_05:55:04.23273     self._flush(objects)
   2023-01-09_05:55:04.23276   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", line 3395, in _flush
   2023-01-09_05:55:04.23280     transaction.rollback(_capture_exception=True)
   2023-01-09_05:55:04.23284   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
   2023-01-09_05:55:04.23289     compat.raise_(
   2023-01-09_05:55:04.23293   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
   2023-01-09_05:55:04.23297     raise exception
   2023-01-09_05:55:04.23301   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", line 3355, in _flush
   2023-01-09_05:55:04.23305     flush_context.execute()
   2023-01-09_05:55:04.23309   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 453, in execute
   2023-01-09_05:55:04.23314     rec.execute(self)
   2023-01-09_05:55:04.23319   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 627, in execute
   2023-01-09_05:55:04.23323     util.preloaded.orm_persistence.save_obj(
   2023-01-09_05:55:04.23327   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 242, in save_obj
   2023-01-09_05:55:04.23336     _emit_insert_statements(
   2023-01-09_05:55:04.23341   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1094, in _emit_insert_statements
   2023-01-09_05:55:04.23347     c = connection._execute_20(
   2023-01-09_05:55:04.23351   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1520, in _execute_20
   2023-01-09_05:55:04.23355     return meth(self, args_10style, kwargs_10style, execution_options)
   2023-01-09_05:55:04.23359   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection
   2023-01-09_05:55:04.23364     return connection._execute_clauseelement(
   2023-01-09_05:55:04.23368   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1389, in _execute_clauseelement
   2023-01-09_05:55:04.23373     ret = self._execute_context(
   2023-01-09_05:55:04.23377   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1748, in _execute_context
   2023-01-09_05:55:04.23381     self._handle_dbapi_exception(
   2023-01-09_05:55:04.23385   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1933, in _handle_dbapi_exception
   2023-01-09_05:55:04.23389     util.raise_(exc_info[1], with_traceback=exc_info[2])
   2023-01-09_05:55:04.23393   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
   2023-01-09_05:55:04.23397     raise exception
   2023-01-09_05:55:04.23401   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context
   2023-01-09_05:55:04.23405     self.dialect.do_execute(
   2023-01-09_05:55:04.23409   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute
   2023-01-09_05:55:04.23413     cursor.execute(statement, parameters)
   2023-01-09_05:55:04.23417   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/MySQLdb/cursors.py", line 199, in execute
   2023-01-09_05:55:04.23423     args = tuple(map(db.literal, args))
   2023-01-09_05:55:04.23427   File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/MySQLdb/connections.py", line 275, in literal
   2023-01-09_05:55:04.23436     s = self.string_literal(o.encode(self.encoding))
   2023-01-09_05:55:04.23440   File "/opt/rh/rh-python38/root/usr/lib64/python3.8/encodings/cp1252.py", line 12, in encode
   2023-01-09_05:55:04.23447     return codecs.charmap_encode(input,errors,encoding_table)
   2023-01-09_05:55:04.23451 UnicodeEncodeError: 'charmap' codec can't encode characters in position 4999-5001: character maps to <undefined>`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org