Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
delta1071
7 years agoExplorer | Level 4
Python 3.5 API upload error
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
Thanks! I see you're referencing a Dropbox web site URL in your path. When identifying files by path on the Dropbox API, you should not use Dropbox web site URLs like this.
You only need to write them relative to "root", so e.g., you might use a value like "/Pi Image Search/123.jpg", to upload a file into a folder named "Pi Image Search", or just "/123.jpg" to upload a file into whatever root your app has.
12 Replies
Replies have been turned off for this discussion
- delta10717 years agoExplorer | Level 4
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-DB7 years ago
Dropbox Community Moderator
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.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!