Open dhanasekaran-anbalagan opened 7 years ago
@dhanasekaran-anbalagan is the error with any files, or just this particular file? Specifically, can you try downloading smaller files and LMK if that works. Basically trying to isolate if this is an issue with very large files.
@diwakergupta thanks for the reply. smaller files ( less than 1GB ) we don't have an issue. The only issue with bigger file more the 2GB+
can you please guide me any workaround is there.
NOTE: One more info. the same file we are able to download via Python API
please let me know if you need more info
I got the same thing but with a smaller file (1,1 Mo) :
`root@pmx1:/home/dropbox/backup# ./dbx get "Operations/Tools/WinX32/7z920.exe" "Operations/Tools/WinX32/7z920.exe"
Error: unexpected end of JSON input`
@mikaelmantel this looks like a different error (unexpected EOF vs. end of JSON input). Do you mind sending me the version info (dbxcli version
) and verbose output (dbxcli -v get ...
)? Also make sure you are working with the latest release.
@dhanasekaran-anbalagan when you say you're able to download via the Python API, are you using the built-in helper utilities or have you written your own code using the API?
Yes, we are using built-in helper utilities, have attached example program.
#!/usr/bin/env python
import dropbox
import os
import logging
import urllib3
# to disable warnings.
urllib3.disable_warnings(urllib3.exceptions.InsecurePlatformWarning)
urllib3.disable_warnings(urllib3.exceptions.SNIMissingWarning)
level = "INFO"
logging.basicConfig(level=level, format="%(levelname)-10s| %(asctime)-10s | %(funcName)-10s | %(message)s")
TOKEN = ''
DBX = dropbox.Dropbox(TOKEN)
def dbx_downloader(dbx_location, local_fs_location):
try:
logging.info("let's start download file from DropBox dbx_location=%s and local_fs_location=%s", dbx_location,
local_fs_location)
DBX.files_download_to_file(
download_path=local_fs_location,
path=dbx_location
)
logging.info("Download completed successfully ..")
except:
import traceback
traceback.print_exc()
if __name__ == '__main__':
import argparse
from argparse import RawTextHelpFormatter
description = '%r\n\nDropBox Downloader..\n%r' \
% ('_' * 60, '_' * 60)
parser = argparse.ArgumentParser(description=description.replace("'", ""), formatter_class=RawTextHelpFormatter)
parser.add_argument('--path', help='Please provide valid path from DropBox', type=str, required=True)
parser.add_argument('--download_path', help='Please provide valid local destination', type=str, default=None)
args = parser.parse_args()
path = args.path
filename = os.path.basename(path)
download_path = filename if args.download_path is None else os.path.join(args.download_path, filename)
dbx_downloader(dbx_location=path, local_fs_location=download_path)
@diwakergupta Oouupss, I did not see that the message was different.
dbxcli version: v2.0.6 SDK version: 1.0.0-beta Spec version: 6194bea
2017/09/11 16:22:00 sdk.go:76: arg: &{/Operations/Tools/WinX32/7z920.exe } 2017/09/11 16:22:00 sdk.go:76: req: &{POST https://content.dropboxapi.com/2/files/download HTTP/1.1 1 1 map[Dropbox-Api-Arg:[{"path":"/Operations/Tools/WinX32/7z920.exe"}]] <nil> <nil> 0 [] false content.dropboxapi.com map[] map[] <nil> map[] <nil> <nil> <nil> <nil>} 2017/09/11 16:22:01 sdk.go:76: resp: &{409 path/restricted_content/.. 409 HTTP/1.1 1 1 map[Content-Type:[application/json] Connection:[keep-alive] X-Dropbox-Request-Id:[a53e0f5476eaf422b70b91570ddff60b] X-Robots-Tag:[noindex, nofollow, noimageindex] Server:[nginx] Date:[Mon, 11 Sep 2017 14:22:01 GMT]] 0xc420128180 -1 [chunked] false false map[] 0xc42000ac00 0xc4200a02c0} 2017/09/11 16:22:01 sdk.go:76: body: [] Error: unexpected end of JSON input
This issue is still present (using version a871c88e22f4575d2f2cb1b77af9a91975acd296) when downloading large files. I have a 200 GB file which can reproduce this issue reliably. I can download 20 GB files, so the problem arises somewhere between these two sizes.
Are there any updates on this? This is happening to me now with a 164GiB file:
Downloading 50 GiB/164 GiB
Error: unexpected EOF
This is with the dbxcli
command utility.
This is also happening to me with large files.
Hi Guys,
When I try to download the file using dbxcli utility, I am getting unexpected end of file error.
~]$ dbxcli version dbxcli version: v2.0.6 SDK version: 1.0.0-beta Spec version: 6194bea