Exceptions become a mess in logs using a Python 3.11 docker operator #33052
Unanswered
notatallshaw-gts
asked this question in
Q&A
Replies: 1 comment 7 replies
-
I'm pretty sure the problem is this code: Treating chunks on a stream like they are log lines and stripping them of all whitespace is not going to produce nice formatting. I am developing a patch and running it locally, if all is successful, I will look to make a PR. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We drive a lot of our scripts via the DockerOperator as we define our Python script environment separately from our Airflow environment.
Recently we upgraded our script environment to Python 3.11 and an issue has come up using the default Airflow log capturing, Python 3.11 introduced these nice arrows: https://realpython.com/python311-error-messages/#improvements-in-python-311
But they don't always stay on one line in the Airflow logs and can end up looking a bit of a mess, e.g. here is a snippet of part of an exception in one of our logs:
Has anyone else suffered this and fixed it? Or would someone be able to give some hints on maybe how to solve this.
Beta Was this translation helpful? Give feedback.
All reactions