2

I'm working on a school project where a camera records a video and then uploads it to Dropbox, sadly I'm having trouble uploading quite large files, the file is about 172Mb.

dropboxServer = dropbox.Dropbox(token)
with open(filename,'rb') as file:
    response = dropboxServer.file_upload(file.read(),'/Videos/'+filename)
    print("Upload:"+response)

The Error: https://pastebin.com/W8NS6BeY

2
  • Could you eleborate a bit more? Like do you get an error? If so which one? Commented Jul 9, 2018 at 11:48
  • OHHHH, I totally forgot,ill post the error soon, thanks :D Commented Jul 9, 2018 at 13:54

3 Answers 3

1

Your connection timeout before the file is uploaded.

Given by: socket.timeout: The write operation timed out from your traceback.

To fix this, you can set (overwrite the default 30 seconds) the timeout when creating the Dropbox object, see more info here: module-dropbox.dropbox

Sign up to request clarification or add additional context in comments.

Comments

0

Per the documentation for files_upload, for large files like this (>150 MB) you should use upload sessions instead:

Do not use this to upload a file larger than 150 MB. Instead, create an upload session with files_upload_session_start().

Comments

0

@chjortlund Thank you for the help! I really appreciate it :D All I did was was change the timeout variable in the dropboxServer object

dropboxSever._timeout = number

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.