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 2022/01/29 07:17:35 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #21053: Fix: Exception when parsing log #20966

uranusjr commented on a change in pull request #21053:
URL: https://github.com/apache/airflow/pull/21053#discussion_r795015300



##########
File path: airflow/providers/cncf/kubernetes/utils/pod_manager.py
##########
@@ -199,7 +199,8 @@ def follow_logs(since_time: Optional[DateTime] = None) -> Optional[DateTime]:
                     ),
                 )
                 for line in logs:
-                    timestamp, message = self.parse_log_line(line.decode('utf-8'))
+                    line = line.decode('utf-8', errors="backslashreplace")
+                    timestamp, message = self.parse_log_line(line)
                     self.log.info(message)

Review comment:
       ```python
                   for raw_line in logs:
                       line = raw_line.decode('utf-8', errors="backslashreplace")
                       timestamp, message = self.parse_log_line(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: commits-unsubscribe@airflow.apache.org

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