Fixed the bug #4251, and fixed a minor bug which causes of OS default character. (#4646)

* bug fixed
bug description:
1, environment: OS which default character is not 'UTF-8'. For example windows 10 which default character is 'gbk'.
2, operation:
python setup.py install
Traceback (most recent call last):
  File "setup.py", line 149, in <module>
    long_description=open("README.rst", "r").read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 41: illegal multibyte sequence

* bug #4251 fixed
https://github.com/iterative/dvc/issues/4251

* bug #4251 fixed
https://github.com/iterative/dvc/issues/4251

* Revert "bug #4251 fixed https://github.com/iterative/dvc/issues/4251"

This reverts commit f524c727

* Revert "bug #4251 fixed https://github.com/iterative/dvc/issues/4251"

This reverts commit fa5db477

* Fix bug #4251
We can check if the source exists by using `dep.exists`

Co-authored-by: zwh <[email protected]>
This commit is contained in:
omar.zhou
2020-10-12 09:00:16 +03:00
committed by GitHub
co-authored by zwh
parent 1d550f35af
commit 59105ec639
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ def get_url(url, out=None):
(dep,) = dependency.loads_from(None, [url])
(out,) = output.loads_from(None, [out], use_cache=False)
dep.save()
if not dep.exists:
raise dep.DoesNotExistError(dep)
dep.download(out)
out.save()
+1 -1
View File
@@ -146,7 +146,7 @@ setup(
name="dvc",
version=version,
description="Git for data scientists - manage your code and data together",
long_description=open("README.rst", "r").read(),
long_description=open("README.rst", "r", encoding="UTF-8").read(),
author="Dmitry Petrov",
author_email="[email protected]",
download_url="https://github.com/iterative/dvc",