Search code examples
pythondropbox-api

Files downloaded from Dropbox API come as a Zip


I am trying to download a file from my Dropbox account, however, on Linux (Raspbian) when I execute the line:

dbx = dropbox.Dropbox(TOKEN)
dbx.files_download_to_file(LOCAL_PATH,r'/file.ppsx')

It is downloaded as a zip. I do not have this problem executing the code on Windows. I'd like to note the file is a .ppsx, a PowerPoint presentation file. I have no problem downloading it manually from Dropbox. My question is, how can I circumvent this problem and download it unzipped?


Solution

  • It seems that Dropbox sent the file not as a zip, but rather changed the name of the file to the directory of where it was installed. I circumvented this problem by using the os.rename module. This solved the problem and allowed me to open the file within the same script.