We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
delta1071
6 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 Dro...
- 6 years ago
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.
delta1071
Explorer | Level 4
Greg,
My conf.json file contains this Dropbox entry:
"use_dropbox": true,
"dropbox_access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"dropbox_base_path": "https://www.dropbox.com/home/Pi%20Image%20Search",
Greg-DB
6 years agoDropbox Staff
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.
- delta10716 years agoExplorer | Level 4
The files are uploading now. It seems like it takes a while before the files appear in my Dropbox folder, because even after changing the upload path, the images were showing up in the local folder folder that I was running the script from, but not in the Dropbox folder. But when I checked the Dropbox folder today, the images from Friday morning were there. So, I assume it's working now. Thanks for your help.
Regards,
delta1071
- Greg-DB6 years agoDropbox Staff
I'm glad to hear you have this working now.
For reference though, note that the files uploaded via the Dropbox API should be available on the Dropbox API/web site as soon as the upload API call returns.
If you weren't seeing the file immediately on the Dropbox web site or a mobile client, it's possible you just needed to refresh, or if you were looking on a desktop client, you may have some general desktop syncing issues.
- randysandy2096 years agoExplorer | Level 3
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?
- delta10716 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-DB6 years agoDropbox Staff
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
795 PostsLatest Activity: 7 days agoIf 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 or Facebook.
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!