cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App 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: 

Re: Problem downloading file from dropbox

Problem downloading file from dropbox

Johnson9070
Helpful | Level 6
Go to solution
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

 

1 Accepted Solution

Accepted Solutions

Johnson9070
Helpful | Level 6
Go to solution

I swapped "to" and "from" location  , never mind this question :winking_face: 

View solution in original post

2 Replies 2

Johnson9070
Helpful | Level 6
Go to solution

I swapped "to" and "from" location  , never mind this question :winking_face: 

Greg-DB
Dropbox Staff
Go to solution

[Cross-linking for reference: https://stackoverflow.com/questions/71549526/downloading-file-from-dropbox-dropbox-api ]

 

Thanks for sharing the resolution. I'm glad to hear you already got this sorted out.

Need more support?