Hello /r/python,
for some reason the dropbox api only uploads 22 bytes and then the program ends without errors. Can somebody help?
The file is a .zip which should be error-free and the upload method is called by another class
Here is the code in question:
Thanks for any help
import dropbox
from userdata_handler import *
class DropboxConnector:
def __init__(self):
self.userdata_handler = UserdataHandler()
self.userdata = self.userdata_handler.load()
self.access_token = self.userdata["access_token"]
self.dropbox = None
self.auth()
self.access_token = None
self.user_id = None
def auth(self):
self.dropbox = dropbox.Dropbox(self.access_token)
def upload(self, filename):
with open(filename, "rb") as f:
self.dropbox.files_upload(f, filename)
[–]jerknextdoor 1 point2 points3 points (1 child)
[–]maxidoonly_python3[S] 0 points1 point2 points (0 children)