Airflow dashboard cannot load logs containing emoji
See original GitHub issueApache Airflow version: 2.1.0
What happened: When printing emoji to a DAG log, the Airflow dashboard fails to display the entire log. When checking the output log in the Airflow dashboard, the following error message appears:
*** Failed to load local log file: /tmp/dag_name/task_name/2021-07-06T10:49:18.136953+00:00/1.log *** ‘ascii’ codec can’t decode byte 0xf0 in position 3424: ordinal not in range(128)
What you expected to happen: The log should be displayed.
How to reproduce it:
Insert the following into any Python DAG, then run it.
print("💼")
How often does this problem occur? Every log with an emoji in it prints an error.
Why would anyone even want to print emoji in their logs? When they’re part of the dataset you’re processing.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
"Failed to fetch log file from worker" when running LocalExecutor
I took a different approach to solve this, which was to declare /usr/local/airflow/logs as a volume in my Dockerfile extending this image, and ......
Read more >Log won't show in Airflow UI - Astronomer Forum
We recently upgraded our Astronomer Enterprise platform to v0.23.10. Since the upgrade, the tasks' logs do not load into the Airflow UI.
Read more >Where do you view the output from airflow jobs - Stack Overflow
Users can specify a logs folder in airflow. cfg. By default, it is in the AIRFLOW_HOME directory.
Read more >Changelog — Airflow Documentation - Apache Airflow
KubernetesExecutor should default to template image if used (#19484). Fix task instance api cannot list task instances with None state (#19487).
Read more >Metrics for Airflow Monitoring and Best Practices - Hevo Data
Airflow Logs files from the WebServer, Scheduler, and Workers doing tasks into a local system file by default.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see this issue is already assigned to @alokshenoy. Hence, please feel free to cancel this PR #17965 if needed.
I’ve had the same issue a few days ago. There is no problem while writing the logs. Hence, only read part needs to be fixed.
Yep. I’ll have a pr out in the next few days.