microhuang edited a comment on issue #20966:
URL: https://github.com/apache/airflow/issues/20966#issuecomment-1017056466
When the task outputs some strange characters, there will be errors when
using UTF-8 decoding due to different encoding. The same problem also exists in
(airflow/hooks/subprocess.py : line 88 : version 2.2.3). You should try to
catch it. I will submit a PR later.
e.g.
```
line = ''
for raw_line in iter(self.sub_process.stdout.readline, b''):
try:
line = raw_line.decode(output_encoding).rstrip()
except UnicodeDecodeError as err:
print(err, output_encoding, raw_line)
self.log.info("%s", line)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]