potiuk commented on issue #5876: [AIRFLOW-5270] JSONDecodeError in DockerOperator when force_pull URL: https://github.com/apache/airflow/pull/5876#issuecomment-552967929 Unfortunately the solution does not work. I tried the "Reproducible case" and run this: ``` from docker import APIClient import json cli = APIClient(base_url='unix://var/run/docker.sock') for l in cli.pull('hello-world', stream=True): print(l) output = json.loads(l.decode('utf-8').replace('\r\n', '\n').strip()) ``` and got this: ``` b'{"status":"Pulling from library/hello-world","id":"latest"}\r\n' b'{"status":"Pulling fs layer","progressDetail":{},"id":"1b930d010525"}\r\n' b'{"status":"Downloading","progressDetail":{"current":488,"total":977},"progress":"[========================\\u003e ] 488B/977B","id":"1b930d010525"}\r\n' b'{"status":"Downloading","progressDetail":{"current":977,"total":977},"progress":"[==================================================\\u003e] 977B/977B","id":"1b930d010525"}\r\n' b'{"status":"Verifying Checksum","progressDetail":{},"id":"1b930d010525"}\r\n' b'{"status":"Download complete","progressDetail":{},"id":"1b930d010525"}\r\n' b'{"status":"Extracting","progressDetail":{"current":977,"total":977},"progress":"[==================================================\\u003e] 977B/977B","id":"1b930d010525"}\r\n' b'{"status":"Extracting","progressDetail":{"current":977,"total":977},"progress":"[==================================================\\u003e] 977B/977B","id":"1b930d010525"}\r\n' b'{"status":"Pull complete","progressDetail":{},"id":"1b930d010525"}\r\n' b'{"status":"Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f"}\r\n' b'{"status":"Pulling from library/hello-world","id":"linux"}\r\n' b'{"status":"Digest: sha256:31ab99b55a32ab6dd0dea8044dc26f89e3c854bf07e47e021bdb69f5c8a918b3"}\r\n' b'{"status":"Pulling from library/hello-world","id":"nanoserver-1709"}\r\n{"errorDetail":{"message":"no matching manifest for linux/amd64 in the manifest list entries"},"error":"no matching manifest for linux/amd64 in the manifest list entries"}\r\n' Traceback (most recent call last): File "test_python.py", line 8, in <module> output = json.loads(l.decode('utf-8').replace('\r\n', '\n').strip()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 342, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 69) ``` Can you please improve your fix @mattpetersen ?
---------------------------------------------------------------- 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] With regards, Apache Git Services
