Forum Discussion

Johnson9070's avatar
Johnson9070
Helpful | Level 6
3 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 😉