Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have a very strange problem. Everything has worked well until this Wednesday. My scripts uploaded files correctly to the dropbox and everything was fine. Suddenly without any change in my python API software the file upload stopped to work. I have created a new dropbox folder /test that is empty. I try to upload a file with dbx.files_upload(open('/tmp/x', "rb").read(), '/test') but I obtain always a new error like
dropbox.exceptions.ApiError: ApiError('55a096d6521d46798f69c670e0601cef', UploadError('path', UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('folder', None)), upload_session_id='pid_upload_session:ABIG52MVsp9DL6fhiaChXBsVvK8XIgp-QMfUB4A-pLKcdsOdng')))
The folder is empty, the call dbx.files_list_folder('/test').entries gives an output [].
I have tried several new software tools that I have found on the net using files_upload_session_start etc. for huge files. All these tools run without any error message but no file is uploaded at the end ( when I do not use the call files_upload of course, I have always the error message ). Other calls like dbx.files_delete_v2 continue to work, only all calls that should upload files do not work any more.
A 'path/conflict/folder' error from files_upload liked you shared here indicates that the upload failed because there is already a folder at the path specified for the upload.
From the description of your test case, this is the expected behavior. You indicated that you created a folder at "/test", and then also performed a files_upload call specifying the '/test' path.
When uploading a file via the API, you need to specify the entire path where you want to put the file, including the both any parent directories as well as the file name and extension itself. So for example, if you want to upload a file named "file.ext" in a folder named "test", you would set the path parameter for files_upload as "/test/file.ext" (instead of just "/test").
It seems to be good now.
I have another problem that has appeared recently. The API call dbx.files_list_folder(path=dropbox_dir) does not give all files as before and I can see only some old files in the folder. I try to obtain a hash of existing files in order not to upload files that did not change.
Is there any possibility to obtain a hash of existing files in a folder by another call as dbx.files_list_folder(path=dropbox_dir) that started to hide some of my new files ?
The files_list_folder method is not guaranteed to return all files/folders in one call. You'll need to have both files_list_folder and files_list_folder_continue implemented to make sure you retrieve all the pages of entries in order to list all files/folders in a folder. Please refer to the documentation linked there for information on how to use that functionality.
Hi there!
If you need more help you can view your support options (expected response time for a 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!