cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('folder', None)

UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('folder', None)

MilosG
New member | Level 2

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.

 

3 Replies 3

Greg-DB
Dropbox Staff

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").

MilosG
New member | Level 2

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 ?

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    MilosG New member | Level 2
What do Dropbox user levels mean?