Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Johnson9070's avatar
Johnson9070
Helpful | Level 6
4 years ago
Solved

Problem downloading file from dropbox

Hi all ,

I can't get this to work:
(part of a python class)

def download_file(self, source_file): "Download a file from Dropbox" print('Start Dropbox download') with open(source_file, "wb") as f: metadata, res = self.dbx.files_download(path='F:/Profielmap/Downloads/DropboxToken.txt') f.write(res.content)

I get error: dropbox did not match pattern
The file should be downloaded in F:/Profielmap/Downloads, tried changing slashes , going through a variable, i keep getting syntax errors about not matching any patteren ,why is this so hard to find ?? ;-)
When i use path="/DropboxToken.txt" the file downloads in F:

Cheers ,John

 

  • I swapped "to" and "from" location  , never mind this question 😉 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!