You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please run which python; python --version; python -m pip list | grep gdown in the root directory of your project and paste the results.
This command obviously doesn't work on Windows:
PS C:\Users\micha> which python; python --version; python -m pip list | grep gdown
which : Die Benennung "which" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ which python; python --version; python -m pip list | grep gdown
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (which:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Python 3.8.2
grep : Die Benennung "grep" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:54
+ which python; python --version; python -m pip list | grep gdown
+ ~~~~
+ CategoryInfo : ObjectNotFound: (grep:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Anyway, I'm assuming that this command grabs the python and gdown versions, right? My python version is 3.8.2. I tried this on the main branch of this repo.
What OS are you using?
Windows 10
Describe the Bug
I ran the tests with pytest -n auto -v tests and they don't work. It seems like their implementation heavily relies on unix commands, which makes them impossible to run Windows.
As for output, I got this:
PS C:\Users\micha\Git\gdown> pytest -n auto -v tests
============================================================================= test session starts ==================================================================
platform win32 -- Python 3.8.2, pytest-7.4.0, pluggy-1.0.0 -- C:\Python38\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\micha\Git\gdown
plugins: Faker-5.0.2, xdist-3.5.0, syrupy-4.6.0
6 workers [14 items]
scheduling tests via LoadScheduling
tests/test___main__.py::test_download_from_url_other_than_gdrive
tests/test___main__.py::test_download_folder_from_gdrive
tests/test___main__.py::test_download_slides_from_gdrive
tests/test_cached_download.py::test_cached_download_sha256
tests/test___main__.py::test_download_large_file_from_gdrive
tests/test_cached_download.py::test_cached_download_md5
[gw0] [ 7%] FAILED tests/test___main__.py::test_download_from_url_other_than_gdrive
tests/test___main__.py::test_download_small_file_from_gdrive
[gw5] [ 14%] PASSED tests/test_cached_download.py::test_cached_download_sha256
[gw4] [ 21%] PASSED tests/test_cached_download.py::test_cached_download_md5
tests/test_download.py::test_download
tests/test_cached_download.py::test_cached_download_sha1
[gw5] [ 28%] FAILED tests/test_download.py::test_download
tests/test_parse_url.py::test_parse_url
[gw5] [ 35%] PASSED tests/test_parse_url.py::test_parse_url
[gw4] [ 42%] PASSED tests/test_cached_download.py::test_cached_download_sha1
[gw0] [ 50%] FAILED tests/test___main__.py::test_download_small_file_from_gdrive
tests/test_download_folder.py::test_valid_page
[gw0] [ 57%] PASSED tests/test_download_folder.py::test_valid_page
[gw3] [ 64%] FAILED tests/test___main__.py::test_download_slides_from_gdrive
tests/test___main__.py::test_download_a_folder_with_file_content_more_than_the_limit
[gw2] [ 71%] FAILED tests/test___main__.py::test_download_folder_from_gdrive
tests/test___main__.py::test_download_a_folder_with_remining_ok_false
[gw2] [ 78%] PASSED tests/test___main__.py::test_download_a_folder_with_remining_ok_false
[gw3] [ 85%] FAILED tests/test___main__.py::test_download_a_folder_with_file_content_more_than_the_limit
[gw1] [ 92%] FAILED tests/test___main__.py::test_download_large_file_from_gdrive
tests/test___main__.py::test_download_and_extract
[gw1] [100%] PASSED tests/test___main__.py::test_download_and_extract
============================================================================ FAILURES =============================================================================
____________________________________________________________ test_download_from_url_other_than_gdrive _____________________________________________________________
[gw0] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_from_url_other_than_gdrive():
url = "https://raw.githubusercontent.com/wkentaro/gdown/3.1.0/gdown/__init__.py"
md5 = "2a51927dde6b146ce56b4d89ebbb5268"
> _test_cli_with_md5(url_or_id=url, md5=md5)
tests\test___main__.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test___main__.py:18: in _test_cli_with_md5
_assert_filehash(path=f.name, hash=f"md5:{md5}")
gdown\cached_download.py:183: in _assert_filehash
hash_actual = _compute_filehash(path=path, algorithm=algorithm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpm322gnx0', algorithm = 'md5'
def _compute_filehash(path, algorithm):
BLOCKSIZE = 65536
if algorithm not in hashlib.algorithms_guaranteed:
raise ValueError(
f"Unsupported hash algorithm: {algorithm}. "
f"Supported algorithms: {hashlib.algorithms_guaranteed}"
)
algorithm_instance = getattr(hashlib, algorithm)()
> with open(path, "rb") as f:
E PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpm322gnx0'
gdown\cached_download.py:169: PermissionError
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Downloading...
From: https://raw.githubusercontent.com/wkentaro/gdown/3.1.0/gdown/__init__.py
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpm322gnx0
3.13kB [00:00, ?B/s]
__________________________________________________________________________ test_download __________________________________________________________________________
[gw5] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download():
url = "https://raw.githubusercontent.com/wkentaro/gdown/3.1.0/gdown/__init__.py" # NOQA
output = "/tmp/gdown_r"
# Usage before https://github.com/wkentaro/gdown/pull/32
> assert download(url, output, quiet=False) == output
tests\test_download.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
url = 'https://raw.githubusercontent.com/wkentaro/gdown/3.1.0/gdown/__init__.py', output = '/tmp/gdown_r', quiet = False, proxy = None, speed = None
use_cookies = True, verify = True, id = None, fuzzy = False, resume = False, format = None
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', log_messages = {}
def download(
url=None,
output=None,
quiet=False,
proxy=None,
speed=None,
use_cookies=True,
verify=True,
id=None,
fuzzy=False,
resume=False,
format=None,
user_agent=None,
log_messages=None,
):
"""Download file from URL.
Parameters
----------
url: str
URL. Google Drive URL is also supported.
output: str
Output filename. Default is basename of URL.
quiet: bool
Suppress terminal output. Default is False.
proxy: str
Proxy.
speed: float
Download byte size per second (e.g., 256KB/s = 256 * 1024).
use_cookies: bool
Flag to use cookies. Default is True.
verify: bool or string
Either a bool, in which case it controls whether the server's TLS
certificate is verified, or a string, in which case it must be a path
to a CA bundle to use. Default is True.
id: str
Google Drive's file ID.
fuzzy: bool
Fuzzy extraction of Google Drive's file Id. Default is False.
resume: bool
Resume the download from existing tmp file if possible.
Default is False.
format: str, optional
Format of Google Docs, Spreadsheets and Slides. Default is:
- Google Docs: 'docx'
- Google Spreadsheet: 'xlsx'
- Google Slides: 'pptx'
user_agent: str, optional
User-agent to use in the HTTP request.
log_messages: dict, optional
Log messages to customize. Currently it supports:
- 'start': the message to show the start of the download
- 'output': the message to show the output filename
Returns
-------
output: str
Output filename.
"""
if not (id is None) ^ (url is None):
raise ValueError("Either url or id has to be specified")
if id is not None:
url = "https://drive.google.com/uc?id={id}".format(id=id)
if user_agent is None:
# We need to use different user agent for file download c.f., folder
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" # NOQA: E501
if log_messages is None:
log_messages = {}
url_origin = url
sess, cookies_file = _get_session(
proxy=proxy,
use_cookies=use_cookies,
user_agent=user_agent,
return_cookies_file=True,
)
gdrive_file_id, is_gdrive_download_link = parse_url(url, warning=not fuzzy)
if fuzzy and gdrive_file_id:
# overwrite the url with fuzzy match of a file id
url = "https://drive.google.com/uc?id={id}".format(id=gdrive_file_id)
url_origin = url
is_gdrive_download_link = True
while True:
res = sess.get(url, stream=True, verify=verify)
if not (gdrive_file_id and is_gdrive_download_link):
break
if url == url_origin and res.status_code == 500:
# The file could be Google Docs or Spreadsheets.
url = "https://drive.google.com/open?id={id}".format(id=gdrive_file_id)
continue
if res.headers["Content-Type"].startswith("text/html"):
m = re.search("<title>(.+)</title>", res.text)
if m and m.groups()[0].endswith(" - Google Docs"):
url = (
"https://docs.google.com/document/d/{id}/export"
"?format={format}".format(
id=gdrive_file_id,
format="docx" if format is None else format,
)
)
continue
elif m and m.groups()[0].endswith(" - Google Sheets"):
url = (
"https://docs.google.com/spreadsheets/d/{id}/export"
"?format={format}".format(
id=gdrive_file_id,
format="xlsx" if format is None else format,
)
)
continue
elif m and m.groups()[0].endswith(" - Google Slides"):
url = (
"https://docs.google.com/presentation/d/{id}/export"
"?format={format}".format(
id=gdrive_file_id,
format="pptx" if format is None else format,
)
)
continue
elif (
"Content-Disposition" in res.headers
and res.headers["Content-Disposition"].endswith("pptx")
and format not in {None, "pptx"}
):
url = (
"https://docs.google.com/presentation/d/{id}/export"
"?format={format}".format(
id=gdrive_file_id,
format="pptx" if format is None else format,
)
)
continue
if use_cookies:
cookie_jar = MozillaCookieJar(cookies_file)
for cookie in sess.cookies:
cookie_jar.set_cookie(cookie)
cookie_jar.save()
if "Content-Disposition" in res.headers:
# This is the file
break
# Need to redirect with confirmation
try:
url = get_url_from_gdrive_confirmation(res.text)
except FileURLRetrievalError as e:
message = (
"Failed to retrieve file url:\n\n{}\n\n"
"You may still be able to access the file from the browser:"
"\n\n\t{}\n\n"
"but Gdown can't. Please check connections and permissions."
).format(
indent("\n".join(textwrap.wrap(str(e))), prefix="\t"),
url_origin,
)
raise FileURLRetrievalError(message)
filename_from_url = None
if gdrive_file_id and is_gdrive_download_link:
filename_from_url = _get_filename_from_response(response=res)
if filename_from_url is None:
filename_from_url = osp.basename(url)
if output is None:
output = filename_from_url
output_is_path = isinstance(output, str)
if output_is_path and output.endswith(osp.sep):
if not osp.exists(output):
os.makedirs(output)
output = osp.join(output, filename_from_url)
if output_is_path:
existing_tmp_files = []
> for file in os.listdir(osp.dirname(output) or "."):
E FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: '/tmp'
gdown\download.py:282: FileNotFoundError
______________________________________________________________ test_download_small_file_from_gdrive _______________________________________________________________
[gw0] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_small_file_from_gdrive():
with open(os.path.join(here, "data/file_ids.csv")) as f:
file_ids = [file_id.strip() for file_id in f]
for file_id in file_ids:
try:
> _test_cli_with_content(url_or_id=file_id, content="spam\n")
tests\test___main__.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
url_or_id = '1cKSdgtWrPgvEsBGmjWALOH33taGyVXKb', content = 'spam\n'
def _test_cli_with_content(url_or_id, content):
with tempfile.NamedTemporaryFile() as f:
subprocess.call(shlex.split(f"gdown {url_or_id} -O {f.name}"))
> with open(f.name) as f:
E PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmp7ersq_ja'
tests\test___main__.py:24: PermissionError
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Downloading...
From: https://drive.google.com/uc?id=1cKSdgtWrPgvEsBGmjWALOH33taGyVXKb
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp7ersq_ja
100%|##########| 5.00/5.00 [00:00<?, ?B/s]
________________________________________________________________ test_download_slides_from_gdrive _________________________________________________________________
[gw3] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_slides_from_gdrive():
file_id = "13AhW1Z1GYGaiTpJ0Pr2TTXoQivb6jx-a"
md5 = "96704c6c40e308a68d3842e83a0136b9"
> _test_cli_with_md5(url_or_id=file_id, md5=md5, options="--format pdf")
tests\test___main__.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test___main__.py:18: in _test_cli_with_md5
_assert_filehash(path=f.name, hash=f"md5:{md5}")
gdown\cached_download.py:183: in _assert_filehash
hash_actual = _compute_filehash(path=path, algorithm=algorithm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmp8zgp0qhs', algorithm = 'md5'
def _compute_filehash(path, algorithm):
BLOCKSIZE = 65536
if algorithm not in hashlib.algorithms_guaranteed:
raise ValueError(
f"Unsupported hash algorithm: {algorithm}. "
f"Supported algorithms: {hashlib.algorithms_guaranteed}"
)
algorithm_instance = getattr(hashlib, algorithm)()
> with open(path, "rb") as f:
E PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmp8zgp0qhs'
gdown\cached_download.py:169: PermissionError
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Downloading...
From (original): https://drive.google.com/uc?id=13AhW1Z1GYGaiTpJ0Pr2TTXoQivb6jx-a
From (redirected): https://docs.google.com/presentation/d/13AhW1Z1GYGaiTpJ0Pr2TTXoQivb6jx-a/export?format=pdf
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp8zgp0qhs
12.3kB [00:00, 738kB/s]
________________________________________________________________ test_download_folder_from_gdrive _________________________________________________________________
[gw2] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_folder_from_gdrive():
with open(os.path.join(here, "data/folder_ids.csv")) as f:
folder_id_and_md5s = [
[x.strip() for x in folder_id.split(",")] for folder_id in f
]
for folder_id, md5 in folder_id_and_md5s:
with tempfile.TemporaryDirectory() as d:
cmd = f"gdown {folder_id} -O {d} --folder"
subprocess.call(shlex.split(cmd))
cmd = "find . -type f -exec md5sum {} \\; | awk '{print $1}' | sort | md5sum | awk '{print $1}'" # noqa: E501
md5_actual = (
> subprocess.check_output(cmd, shell=True, cwd=d).decode().strip()
)
tests\test___main__.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Python38\lib\subprocess.py:411: in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
input = None, capture_output = False, timeout = None, check = True
popenargs = ("find . -type f -exec md5sum {} \\; | awk '{print $1}' | sort | md5sum | awk '{print $1}'",)
kwargs = {'cwd': 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpmc7ozs4j', 'shell': True, 'stdout': -1}, process = <subprocess.Popen object at 0x0000012B78E15FD0>
stdout = b'', stderr = None, retcode = 255
def run(*popenargs,
input=None, capture_output=False, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
"""
if input is not None:
if kwargs.get('stdin') is not None:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE
if capture_output:
if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
raise ValueError('stdout and stderr arguments may not be used '
'with capture_output.')
kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired as exc:
process.kill()
if _mswindows:
# Windows accumulates the output in a single blocking
# read() call run on child threads, with the timeout
# being done in a join() on those threads. communicate()
# _after_ kill() is required to collect that and add it
# to the exception.
exc.stdout, exc.stderr = process.communicate()
else:
# POSIX _communicate already populated the output so
# far into the TimeoutExpired exception.
process.wait()
raise
except: # Including KeyboardInterrupt, communicate handled that.
process.kill()
# We don't call process.wait() as .__exit__ does that for us.
raise
retcode = process.poll()
if check and retcode:
> raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command 'find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}'' returned non-zero exit status 255.
C:\Python38\lib\subprocess.py:512: CalledProcessError
---------------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------------
Retrieving folder 1aMZqPaU03E7XOQNXtjSCdguRHBaIQ82m directory-0
Retrieving folder 1hVAxfM7_doToqQ24eVd65cgiaoLi0TtO directory-1
Retrieving folder 1prRl33LyYwP0ln42AmiAqofHMcStg3g5 directory-1-0
Processing file 1RyMSM4CR-1N-7l3d0zbxi5u6rKJd4TGv lego-doge.jpg
Retrieving folder 15hRqYgHlnRDE-LcztlBt_7qmHU_karOY directory-1-1
Retrieving folder 106Kc1X_cniGYTRbNkbSITk8bys3X1RTA directory-1-2
Processing file 17-rOnPM7pm-WZYArESIe-uSR_QGbPLIP earth.jpg
Processing file 1e7MqAJkHDcdmqTuiU4Non4xeYo0qE_sE sun.jpg
Processing file 1Z2VYnXb01h-3uvEptoQ48Fo__eAn0wc1 fractal.jpg
Processing file 14xzOzvKjP0at07jfonV7qVrTKoctFijz this is a file.txt
Processing file 1wlapSEt6N9Ayf7fzCTOkra_4GIg-cqeD tux.jpg
Building directory structure completed
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Retrieving folder contents
Retrieving folder contents completed
Building directory structure
Downloading...
From: https://drive.google.com/uc?id=1RyMSM4CR-1N-7l3d0zbxi5u6rKJd4TGv
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\directory-1\directory-1-0\lego-doge.jpg
100%|##########| 64.2k/64.2k [00:00<00:00, 441kB/s]
Downloading...
From: https://drive.google.com/uc?id=17-rOnPM7pm-WZYArESIe-uSR_QGbPLIP
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\directory-1\directory-1-2\earth.jpg
100%|##########| 134k/134k [00:00<00:00, 1.05MB/s]
Downloading...
From: https://drive.google.com/uc?id=1e7MqAJkHDcdmqTuiU4Non4xeYo0qE_sE
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\directory-1\directory-1-2\sun.jpg
100%|##########| 32.9k/32.9k [00:00<00:00, 592kB/s]
Downloading...
From: https://drive.google.com/uc?id=1Z2VYnXb01h-3uvEptoQ48Fo__eAn0wc1
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\fractal.jpg
100%|##########| 128k/128k [00:00<00:00, 641kB/s]
Downloading...
From: https://drive.google.com/uc?id=14xzOzvKjP0at07jfonV7qVrTKoctFijz
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\this is a file.txt
100%|##########| 8.22k/8.22k [00:00<00:00, 618kB/s]
Downloading...
From: https://drive.google.com/uc?id=1wlapSEt6N9Ayf7fzCTOkra_4GIg-cqeD
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpmc7ozs4j\tux.jpg
100%|##########| 9.86k/9.86k [00:00<00:00, 1.10MB/s]
Download completed
Der Befehl "awk" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
__________________________________________________ test_download_a_folder_with_file_content_more_than_the_limit ___________________________________________________
[gw3] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_a_folder_with_file_content_more_than_the_limit():
url = "https://drive.google.com/drive/folders/1gd3xLkmjT8IckN6WtMbyFZvLR4exRIkn"
with tempfile.TemporaryDirectory() as d:
cmd = f"gdown {url} -O {d} --folder --remaining-ok"
subprocess.check_call(shlex.split(cmd))
filenames = sorted(os.listdir(d))
for i in range(50):
> assert filenames[i] == f"file_{i:02d}.txt"
E IndexError: list index out of range
tests\test___main__.py:130: IndexError
---------------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------------
Processing file 108RHF3bQb6dgOByv_KMGzHuktJOwU_jL file_00.txt
Processing file 1Sul7bhaimPjncS2GE73nVloSPQbtyzu- file_01.txt
Processing file 15ncHBWop2Ypk0Nt7poRbiw65CstAycIZ file_02.txt
Processing file 1exxxYRns6YMMhB2AYjjki7pEPUtMPy5T file_03.txt
Processing file 1Ti1_f0Tx6HC8ZB6_5GWz4auqBvUPeyaS file_04.txt
Processing file 1paKVZ_Kk487BxXV1ToesgAL-zMythu62 file_05.txt
Processing file 1bxLW81y8fAa90Hajjb86bWgHa9eSkqLs file_06.txt
Processing file 1ecJfx0bwKhMkCxP39yfp5e_XJzTrbQrP file_07.txt
Processing file 1X5kn6aWzgKYTOUm5VFvKOKJAAUPT5SJZ file_08.txt
Processing file 1SlfLCmTRgIvidfgALKKFL_l8tgjNgxwZ file_09.txt
Processing file 1a0EqnP2ZflPXQYeisg55q6WDct4GpquV file_10.txt
Processing file 16L65PEtseREsKaBuipdflXRl3Hs4zqUE file_11.txt
Processing file 15jr5_d-zRtClh5PwG5BerbgiWgCOFejC file_12.txt
Processing file 1FKr5ne-yUT0Vd4QDjtZ4UuipXZTgTfQA file_13.txt
Processing file 11Ge2s8ah63318fhENaoMsvaXrwNiqdHC file_14.txt
Processing file 1so1B50wyo2fkSmbG5Gi65YLIJTPf4zDF file_15.txt
Processing file 1-CqLgaPdcPSdQjvRXPm5xL462OZ2HUU_ file_16.txt
Processing file 1LEttBPnbDg3i5K6Duqmfsk81yxvoFrbd file_17.txt
Processing file 1ozzr7JDo8EyoZ7DwFeeXJD-ChjYO0hYv file_18.txt
Processing file 1bcX7CBtTIHwEKP3V-6N-8TI2OIZafpsN file_19.txt
Processing file 1ahmFBNuefVhARIBI_XpxLpbdzA0giulE file_20.txt
Processing file 1gnLQ9rlT7lUfnvHVgBT4MwQ5c2PRS3OE file_21.txt
Processing file 1adzHo3lpuJOjwU-2TnaRwAUzazq972uG file_22.txt
Processing file 1u-y2E2gLbHdfx6waRdvDweEvkhKTR5lm file_23.txt
Processing file 1v-Iu_KUjYkW-yUfIgY7t5zDvTtLM0Yeo file_24.txt
Processing file 1QNHMdrvizgBhjcNHH5Nw_4hnMAZ4zqcK file_25.txt
Processing file 1J2gm2j8DklwujWWAxTsyUQFggRK1lf7P file_26.txt
Processing file 1mWC2UaPxYtkW4Y8RGwjhEuKWoXt8B0Zr file_27.txt
Processing file 1qwpRCjEsxbGAhEjpjc_Iln93rl4WClbX file_28.txt
Processing file 1JvQt0TfI65rnYzdww1F6kmv1AAYqBQSs file_29.txt
Processing file 1QUB_Ub6uOmA_xFlYtUqLaKFhLMmni6EZ file_30.txt
Processing file 1tbWWzXZxTAmKpJNuVJO0cbQ5MC_0M6SB file_31.txt
Processing file 1CW_et6xEwUpn_BQpt59dfK750baxjTwS file_32.txt
Processing file 1HKWHJKDEV1y1wt_hrvT934yzbmlwEQoA file_33.txt
Processing file 1J_ws2re_S1a5fEWTPPTWiCsqBfyKghbU file_34.txt
Processing file 1flpFPFX4nSl-kolgcPON7uGSf6w_5HNm file_35.txt
Processing file 1vPK85rAt4LxcmJ95xMQFTgD7aLht4nim file_36.txt
Processing file 1UB_5IyGMgTjvvO8gi8H1FSv2BUp-t1ER file_37.txt
Processing file 12mrcZm_gm2rLuV4PaK4x22WRqOq7c4zH file_38.txt
Processing file 1CeH6X_H7J0URChCquhq2nCNUY44UjzRr file_39.txt
Processing file 12hJu1CtPCXB4M_wwDmJQI-wHuY_ediFt file_40.txt
Processing file 18CXyTrb6MLqgfrEiPn758o9R0E0YXDTT file_41.txt
Processing file 1XpUDUAOU-DR4JwxsqlEi0Fq1_Dn8EBVa file_42.txt
Processing file 1lVxG-DbIubeJqT2QkW2nRR69AzQAAFnl file_43.txt
Processing file 1GkftJhUZI7StiFHDoQuXJXEOrskvcvWB file_44.txt
Processing file 17iGyuDITSJz5UUzgDFvAVJxl08FPap1T file_45.txt
Processing file 1qNG4A8cRR8sGiNJkDmCMoW4DwshjLR3a file_46.txt
Processing file 19ldN2ryaeSpfUQxc5TJApDfQUBEdK24g file_47.txt
Processing file 1Q7APM1KuQbxyg4BFK6hSMmB3LE3zXOmq file_48.txt
Processing file 1cI2JlSe_VXtTC41C5NLhjQX0i1IwCrb1 file_49.txt
Building directory structure completed
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Retrieving folder contents
Retrieving folder contents completed
Building directory structure
Downloading...
From: https://drive.google.com/uc?id=108RHF3bQb6dgOByv_KMGzHuktJOwU_jL
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_00.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1Sul7bhaimPjncS2GE73nVloSPQbtyzu-
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_01.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=15ncHBWop2Ypk0Nt7poRbiw65CstAycIZ
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_02.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1exxxYRns6YMMhB2AYjjki7pEPUtMPy5T
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_03.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1Ti1_f0Tx6HC8ZB6_5GWz4auqBvUPeyaS
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_04.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1paKVZ_Kk487BxXV1ToesgAL-zMythu62
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_05.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1bxLW81y8fAa90Hajjb86bWgHa9eSkqLs
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_06.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1ecJfx0bwKhMkCxP39yfp5e_XJzTrbQrP
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_07.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1X5kn6aWzgKYTOUm5VFvKOKJAAUPT5SJZ
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_08.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1SlfLCmTRgIvidfgALKKFL_l8tgjNgxwZ
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_09.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1a0EqnP2ZflPXQYeisg55q6WDct4GpquV
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_10.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=16L65PEtseREsKaBuipdflXRl3Hs4zqUE
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_11.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=15jr5_d-zRtClh5PwG5BerbgiWgCOFejC
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_12.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1FKr5ne-yUT0Vd4QDjtZ4UuipXZTgTfQA
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_13.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=11Ge2s8ah63318fhENaoMsvaXrwNiqdHC
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_14.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1so1B50wyo2fkSmbG5Gi65YLIJTPf4zDF
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_15.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1-CqLgaPdcPSdQjvRXPm5xL462OZ2HUU_
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_16.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1LEttBPnbDg3i5K6Duqmfsk81yxvoFrbd
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_17.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1ozzr7JDo8EyoZ7DwFeeXJD-ChjYO0hYv
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_18.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1bcX7CBtTIHwEKP3V-6N-8TI2OIZafpsN
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_19.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1ahmFBNuefVhARIBI_XpxLpbdzA0giulE
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_20.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1gnLQ9rlT7lUfnvHVgBT4MwQ5c2PRS3OE
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_21.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1adzHo3lpuJOjwU-2TnaRwAUzazq972uG
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_22.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1u-y2E2gLbHdfx6waRdvDweEvkhKTR5lm
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_23.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1v-Iu_KUjYkW-yUfIgY7t5zDvTtLM0Yeo
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_24.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1QNHMdrvizgBhjcNHH5Nw_4hnMAZ4zqcK
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_25.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1J2gm2j8DklwujWWAxTsyUQFggRK1lf7P
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_26.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1mWC2UaPxYtkW4Y8RGwjhEuKWoXt8B0Zr
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_27.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1qwpRCjEsxbGAhEjpjc_Iln93rl4WClbX
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_28.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1JvQt0TfI65rnYzdww1F6kmv1AAYqBQSs
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_29.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1QUB_Ub6uOmA_xFlYtUqLaKFhLMmni6EZ
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_30.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1tbWWzXZxTAmKpJNuVJO0cbQ5MC_0M6SB
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_31.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1CW_et6xEwUpn_BQpt59dfK750baxjTwS
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_32.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1HKWHJKDEV1y1wt_hrvT934yzbmlwEQoA
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_33.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1J_ws2re_S1a5fEWTPPTWiCsqBfyKghbU
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_34.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1flpFPFX4nSl-kolgcPON7uGSf6w_5HNm
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_35.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1vPK85rAt4LxcmJ95xMQFTgD7aLht4nim
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_36.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1UB_5IyGMgTjvvO8gi8H1FSv2BUp-t1ER
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_37.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=12mrcZm_gm2rLuV4PaK4x22WRqOq7c4zH
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_38.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1CeH6X_H7J0URChCquhq2nCNUY44UjzRr
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_39.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=12hJu1CtPCXB4M_wwDmJQI-wHuY_ediFt
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_40.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=18CXyTrb6MLqgfrEiPn758o9R0E0YXDTT
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_41.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1XpUDUAOU-DR4JwxsqlEi0Fq1_Dn8EBVa
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_42.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1lVxG-DbIubeJqT2QkW2nRR69AzQAAFnl
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_43.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1GkftJhUZI7StiFHDoQuXJXEOrskvcvWB
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_44.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=17iGyuDITSJz5UUzgDFvAVJxl08FPap1T
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_45.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1qNG4A8cRR8sGiNJkDmCMoW4DwshjLR3a
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_46.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=19ldN2ryaeSpfUQxc5TJApDfQUBEdK24g
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_47.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1Q7APM1KuQbxyg4BFK6hSMmB3LE3zXOmq
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_48.txt
0.00B [00:00, ?B/s]
Downloading...
From: https://drive.google.com/uc?id=1cI2JlSe_VXtTC41C5NLhjQX0i1IwCrb1
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmp14wul3gl\file_49.txt
0.00B [00:00, ?B/s]
Download completed
______________________________________________________________ test_download_large_file_from_gdrive _______________________________________________________________
[gw1] win32 -- Python 3.8.2 C:\Python38\python.exe
def test_download_large_file_from_gdrive():
with open(os.path.join(here, "data/file_ids_large.csv")) as f:
file_id_and_md5s = [[x.strip() for x in file_id.split(",")] for file_id in f]
for file_id, md5 in file_id_and_md5s:
try:
> _test_cli_with_md5(url_or_id=file_id, md5=md5)
tests\test___main__.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test___main__.py:18: in _test_cli_with_md5
_assert_filehash(path=f.name, hash=f"md5:{md5}")
gdown\cached_download.py:183: in _assert_filehash
hash_actual = _compute_filehash(path=path, algorithm=algorithm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpfbam_xiz', algorithm = 'md5'
def _compute_filehash(path, algorithm):
BLOCKSIZE = 65536
if algorithm not in hashlib.algorithms_guaranteed:
raise ValueError(
f"Unsupported hash algorithm: {algorithm}. "
f"Supported algorithms: {hashlib.algorithms_guaranteed}"
)
algorithm_instance = getattr(hashlib, algorithm)()
> with open(path, "rb") as f:
E PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpfbam_xiz'
gdown\cached_download.py:169: PermissionError
---------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------
Downloading...
From (original): https://drive.google.com/uc?id=1s52ek_4YTDRt_EOkx1FS53u-vJa0c4nu
To: C:\Users\micha\Git\gdown\UsersmichaAppDataLocalTemptmpfbam_xiz
100%|##########| 348M/348M [00:53<00:00, 6.49MB/s]
===================================================================== short test summary info =====================================================================
FAILED tests/test___main__.py::test_download_from_url_other_than_gdrive - PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpm322gnx0'
FAILED tests/test_download.py::test_download - FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: '/tmp'
FAILED tests/test___main__.py::test_download_small_file_from_gdrive - PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmp7ersq_ja'
FAILED tests/test___main__.py::test_download_slides_from_gdrive - PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmp8zgp0qhs'
FAILED tests/test___main__.py::test_download_folder_from_gdrive - subprocess.CalledProcessError: Command 'find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}'' returned non-zero exit status ...
FAILED tests/test___main__.py::test_download_a_folder_with_file_content_more_than_the_limit - IndexError: list index out of range
FAILED tests/test___main__.py::test_download_large_file_from_gdrive - PermissionError: [Errno 13] Permission denied: 'C:\\Users\\micha\\AppData\\Local\\Temp\\tmpfbam_xiz'
================================================================== 7 failed, 7 passed in 58.40s ===================================================================
Expected Behavior
Tests pass.
To Reproduce
Check out the repo.
pip install .[test]
pytest -n auto -v tests
The text was updated successfully, but these errors were encountered:
Provide environment information
This command obviously doesn't work on Windows:
Anyway, I'm assuming that this command grabs the python and gdown versions, right? My python version is 3.8.2. I tried this on the main branch of this repo.
What OS are you using?
Windows 10
Describe the Bug
I ran the tests with
pytest -n auto -v tests
and they don't work. It seems like their implementation heavily relies on unix commands, which makes them impossible to run Windows.As for output, I got this:
Expected Behavior
Tests pass.
To Reproduce
pip install .[test]
pytest -n auto -v tests
The text was updated successfully, but these errors were encountered: