Dvc: alibaba/oss: error when uploading empty files

Created on 29 Sep 2020  路  2Comments  路  Source: iterative/dvc

https://github.com/iterative/dvc/runs/1180001039?check_suite_focus=true

2020-09-29T03:21:38.5805136Z Traceback (most recent call last):
2020-09-29T03:21:38.5807061Z   File "/home/runner/work/dvc/dvc/dvc/cache/local.py", line 31, in wrapper
2020-09-29T03:21:38.5807691Z     func(from_info, to_info, *args, **kwargs)
2020-09-29T03:21:38.5808305Z   File "/home/runner/work/dvc/dvc/dvc/tree/base.py", line 351, in upload
2020-09-29T03:21:38.5808825Z     no_progress_bar=no_progress_bar,
2020-09-29T03:21:38.5809375Z   File "/home/runner/work/dvc/dvc/dvc/tree/oss.py", line 124, in _upload
2020-09-29T03:21:38.5809994Z     to_info.path, from_file, progress_callback=pbar.update_to
2020-09-29T03:21:38.5811260Z   File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/oss2/api.py", line 585, in put_object_from_file
2020-09-29T03:21:38.5812194Z     return self.put_object(key, f, headers=headers, progress_callback=progress_callback)
2020-09-29T03:21:38.5813405Z   File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/oss2/api.py", line 557, in put_object
2020-09-29T03:21:38.5814852Z     resp = self.__do_object('PUT', key, data=data, headers=headers)
2020-09-29T03:21:38.5816078Z   File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/oss2/api.py", line 2424, in __do_object
2020-09-29T03:21:38.5816857Z     return self._do(method, self.bucket_name, key, **kwargs)
2020-09-29T03:21:38.5817883Z   File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/oss2/api.py", line 229, in _do
2020-09-29T03:21:38.5818489Z     raise e
2020-09-29T03:21:38.5820172Z oss2.exceptions.ServerError: {'status': 411, 'x-oss-request-id': '0C07B0139E80811C37CD6611', 'details': {'Code': 'MissingContentLength', 'Message': 'No Content-Length in request header.', 'RequestId': '0C07B0139E80811C37CD6611', 'HostId': 'oss.aliyun.com'}}

Potentially just a bug in https://github.com/iterative/oss-emulator .

bug p2-medium research

Most helpful comment

A test connecting to the real OSS (#4735) doesn't show any error. So, the error might come from the emulator.

All 2 comments

A test connecting to the real OSS (#4735) doesn't show any error. So, the error might come from the emulator.

Thank you for the research @julsal ! :pray:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregfriedland picture gregfriedland  路  3Comments

jorgeorpinel picture jorgeorpinel  路  3Comments

dmpetrov picture dmpetrov  路  3Comments

shcheklein picture shcheklein  路  3Comments

mfrata picture mfrata  路  3Comments