Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello. I am trying to upload a file using this Python code:
with open("{} - my-file-name.xlsx".format( datetime.now().strftime('%Y%m%d')), "rb") as f: dbx.files_upload( f.read(), "/path/to/folder{} - my-file-name.xlsx".format( datetime.now().strftime('%Y%m%d')))
And I am getting this error:
Upload to Dropbox error: ApiError('*******************', UploadError('path', UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('file', None)), upload_session_id='*******************')))
Can anyone help pls?
Hi @vherasme,
Seems the file already exists. If I have to bet, You probably make erroneous upload instead update.
Hope this gives some direction.
That's correct, that 'path/conflict/file' indicates the upload failed because there's already a file at the specified path. You can find this WriteConflictError error in the documentation here.
You can control the conflict behavior via the `mode` and `autorename` parameters for the `files_upload` method. The documentation there has more information about the different options and what they do.
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!