cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python 3.5 API upload error

Python 3.5 API upload error

delta1071
Explorer | Level 4
Go to solution

I'm using a Raspberry Pi 3 B+ with the a Pi Camera to record surveillance images and occasionally upload them to my Dropbox account. The Python script runs until it's time to upload the images to Dropbox and then this error occurs:

[UPLOAD] Wednesday 12 December 2018 07:43:50AM
Traceback (most recent call last):
File "pi_surveillance.py", line 126, in <module>
client.files_upload(open(t.path, "rb").read(), path)
File "/home/pi/.virtualenvs/cv/lib/python3.5/site-packages/dropbox/base.py", line 2187, in files_upload
f,
File "/home/pi/.virtualenvs/cv/lib/python3.5/site-packages/dropbox/dropbox.py", line 296, in request
user_message_locale)
dropbox.exceptions.ApiError: ApiError('88dea4768f5b9c6b5cfc7e05ce25133d', UploadError('path', UploadWriteFailed

I was previously receiving a "malformed token" error, but it has since been replaced with this new error. Can anyone steer me in the right direction. Any help is greatly appreciated.

 

Regards,

delta1071

 

 

12 Replies 12

randysandy209
Explorer | Level 3
Go to solution

Hi there,

I am receiving a WriteError for a malformed path:

UploadError('path', UploadWriteFailed(reason=WriteError('malformed_path', None), ))

"dropbox_base_path": "/HomeSec",

 

Any ideas where I am going wrong?

 

 

delta1071
Explorer | Level 4
Go to solution

This question has already been answered at https://www.dropboxforum.com/t5/Discuss-Developer-API/Python-3-5-API-upload-error/m-p/317699#M345. 

In my conf.json file, the dropbox_base_path reads: "Apps/Pi Image Search/Pi/Surveillance", because my Dropbox home account contains a folder named "Apps", which contains a folder named "Pi Image Search", which contains a folder named "Pi", which contains a folder named "Surveillance", which is where my images are uploaded to. Note that there is no leading "/" and that paths that contain folder/filenames with spaces in them must be surrounded by quote marks. Hope this info makes the "dropbox_base_path" variable a little easier to understand.

delta1071

Greg-DB
Dropbox Staff
Go to solution

@randysandy209 I see you also posted another thread for this:

https://www.dropboxforum.com/t5/Discuss-Developer-API/malformed-path-issue/m-p/330481#M491

Please feel free to follow up there if you have any remaining questions after the help that delta1071 gave.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    delta1071 Explorer | Level 4
  • User avatar
    randysandy209 Explorer | Level 3
What do Dropbox user levels mean?