question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Airflow dashboard cannot load logs containing emoji

See original GitHub issue

Apache 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Narendra-Neerukondacommented, Sep 1, 2021

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.

1reaction
alokshenoycommented, Aug 30, 2021

Yep. I’ll have a pr out in the next few days.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found