Basically, I am having a similar problem to what a user named delta was having at the thread located via https://www.dropboxforum.com/t5/Discuss-Developer-API/Python-3-5-API-upload-error/m-p/317699#M345.%C2%A0
We are using the same code, but instead of an UploadWriteFailed, I am receiving,
Traceback (most recent call last):
File "pi_surveillance.py", line 125, in <module>
client.files_upload(open(t.path, "rb").read(), path)
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/dropbox/base.py", line 2458, in files_upload
f,
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/dropbox/dropbox.py", line 274, in request
timeout=timeout)
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/dropbox/dropbox.py", line 365, in request_json_string_with_retry
timeout=timeout)
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/dropbox/dropbox.py", line 456, in request_json_string
raise BadInputError(request_id, r.text)
dropbox.exceptions.BadInputError: BadInputError('5357e21e05231ec14ee350a296cced7b', 'Error in call to API function "files/upload": The given OAuth 2 access token is malformed.')
Basically giving me the error that the auth token is malformed.
"use_dropbox": true,
"dropbox_access_token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dropbox_base_path": "/security",
This is the config file that verifies dropbox, and the error is happening here.
print("[UPLOAD] {}".format(ts))
path = "/{base_path}/{timestamp}.jpg".format(
base_path=conf["dropbox_base_path"], timestamp=ts)
client.files_upload(open(t.path, "rb").read(), path)
t.cleanup()
I could definitely use some assistance with this if anyone can, thank you!