[ 
https://issues.apache.org/jira/browse/AIRFLOW-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17095373#comment-17095373
 ] 

ASF GitHub Bot commented on AIRFLOW-3439:
-----------------------------------------

acroos commented on pull request #4474:
URL: https://github.com/apache/airflow/pull/4474#issuecomment-621147767


   This actually introduces a bug when using the `json-file` log driver.  The 
[pull 
method](https://docker-py.readthedocs.io/en/stable/api.html#docker.api.image.ImageApiMixin.pull)
 on `APIClient` returns a generator, which in this case returns `dict`s. The 
result is the following error:
   ```
   [2020-04-29 11:14:59,010] {taskinstance.py:1145} ERROR - 'dict' object has 
no attribute 'decode'
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 
983, in _run_raw_task
       result = task_copy.execute(context=context)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/operators/docker_operator.py", 
line 269, in execute
       output = json.loads(l.decode('utf-8').strip())
   AttributeError: 'dict' object has no attribute 'decode'
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


> Logs with non-ascii characters can't be read from GCS
> -----------------------------------------------------
>
>                 Key: AIRFLOW-3439
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3439
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: logging, webserver
>    Affects Versions: 1.10.1
>            Reporter: Pavel Raschetnov
>            Assignee: Jarek Potiuk
>            Priority: Major
>              Labels: UTF-8, encoding, gcp, gcs_task_handler
>             Fix For: 1.10.10
>
>
> Can't see task logs in web interface due to
> {{*** Unable to read remote log from 
> gs://bucket/dag/abcd61826/2018-11-23T00:00:00+00:00/1.log *** 'ascii' codec 
> can't decode byte 0xc3 in position 4421445: ordinal not in range(128)}}
> GCSTaskHandler should use `.decode('utf-8') instead of `.decode` in 
> gcs_read() method
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to