We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
vherasme
6 years agoExplorer | Level 4
Error when uploading to folder - Python client
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?
2 Replies
- Здравко6 years agoLegendary | Level 20
Hi vherasme,
Seems the file already exists. If I have to bet, You probably make erroneous upload instead update. :wink:
Hope this gives some direction.
- Greg-DB6 years ago
Dropbox Community Moderator
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,034 PostsLatest Activity: 3 hours ago
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 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!