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/02/05 18:19:47 UTC

[GitHub] [airflow] aa3pankaj commented on issue #21127: Fail to download task log if there are Chinese characters in dag_id

aa3pankaj commented on issue #21127:
URL: https://github.com/apache/airflow/issues/21127#issuecomment-1030673862


   @EricGao888 
   We can fix this from our code itself,
   As we add attachment filename in the headers, gunicorn code tries to encode it with "latin-1" and fails (when it contains chinese chars),
   So, before sending the response itself, we can do something like:
   ```
   # attachment_filename = task_log_reader.render_log_filename(ti, try_number, session=session)
   attachment_filename = urllib.parse.quote(task_log_reader.render_log_filename(ti, try_number, session=session))
   ```
   
   **I can raise PR with this fix, you can assign this issue to me.**


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