I am having the same problem. I am also trying to upload a pdf that has editable fields, but I also tested it with a blank pdf and found it also would not work. below is a copy of my code. (very similar to the original post)
files = os.listdir(os.getcwd())
for f in files:
if f.endswith('.pdf'):
#try:
with open(f, 'rb') as pdf:
dbx.files_upload(pdf.read(),folder, mode=dropbox.files.WriteMode.overwrite, mute=True)
print("Uploaded " + f)
#except:
#print("Failed to upload " + f)
with the error trapping commented out as shown I get the following error.
ApiError: ApiError('52f678d99929196d2932392461245c1e', UploadError('path', UploadWriteFailed(reason=WriteError('conflict', WriteConflictError('folder', None)), upload_session_id='AAAAAAABUBUiDKOvC0Pm5A')))
There is no conflict, I have used the overwrite mode and also made sure that there is no file already on dropbox that has that name