Giter VIP home page Giter VIP logo

Comments (10)

diwakergupta avatar diwakergupta commented on May 30, 2024

@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.

from dbxcli.

dhanasekaran-anbalagan avatar dhanasekaran-anbalagan commented on May 30, 2024

@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

from dbxcli.

mikaelmantel avatar mikaelmantel commented on May 30, 2024

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`

from dbxcli.

diwakergupta avatar diwakergupta commented on May 30, 2024

@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.

from dbxcli.

diwakergupta avatar diwakergupta commented on May 30, 2024

@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?

from dbxcli.

dhanasekaran-anbalagan avatar dhanasekaran-anbalagan commented on May 30, 2024

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)

from dbxcli.

mikaelmantel avatar mikaelmantel commented on May 30, 2024

@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

from dbxcli.

szarnyasg avatar szarnyasg commented on May 30, 2024

This issue is still present (using version a871c88) 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.

from dbxcli.

edoyango avatar edoyango commented on May 30, 2024

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.

from dbxcli.

nightpool avatar nightpool commented on May 30, 2024

This is also happening to me with large files.

from dbxcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.