cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know all about tools for creatives that work seamlessly with Dropbox, like Adobe? Well, check it out right here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Downloading .h5 file with urllib

Downloading .h5 file with urllib

colehurwitz
New member | Level 2

Hello,

I recently uploaded a 4gb .h5 file onto dropbox under this url:

https://www.dropbox.com/s/1jolgsw5kgxmsd5/recordings_300_SqMEA-10-15um_minamp0_60s_10uV_far-neurons_...

When I try to download it using urllib in python 3:

file_url = 'https://www.dropbox.com/s/1jolgsw5kgxmsd5/recordings_300_SqMEA-10-15um_minamp0_60s_10uV_far-neurons_...'

file_name = 'recordings_300_SqMEA-10-15um_minamp0_60s_10uV_far-    neurons_bpf_25-03-2019.h5'

urllib.request.urlretrieve(file_url, file_name)

It downloads a 226K file that can't be parsed. Any idea what the issue might be or what I am doing wrong here? I can download the file normally by pressing the download button on the dropbox page.

Best regards,

Cole Hurwitz

1 Accepted Solution

Accepted Solutions

Re: Downloading .h5 file with urllib

Greg-DB
Dropboxer

That URL is actually for a preview web page for the file, not the file data itself. (The short file you're getting back is probably the HTML page itself.)

You can modify these shared links for direct file access if you need though. You can find information on doing so here:

https://help.dropbox.com/desktop-web/force-download

View solution in original post

2 Replies 2

Re: Downloading .h5 file with urllib

Greg-DB
Dropboxer

That URL is actually for a preview web page for the file, not the file data itself. (The short file you're getting back is probably the HTML page itself.)

You can modify these shared links for direct file access if you need though. You can find information on doing so here:

https://help.dropbox.com/desktop-web/force-download

View solution in original post

Re: Downloading .h5 file with urllib

colehurwitz
New member | Level 2

Thanks so much! This worked.

Poll
Do you work or study in the creative industry? If so, which area?
If you use Adobe, don't forget to check out our latest integrations update here.
Who's talking

Top contributors to this post

  • User avatar
    colehurwitz New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?