One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
rekte
8 years agoExplorer | Level 3
UploadWriteFailed(reason=WriteError('disallowed_name', None)
I'm trying to upload a whole folder to dropbox but only the files get uploaded. Should I create a folder programatically or can I solve the folder-uploading so simple? Thanks
import os import dropbox access_token = '***********************' dbx = dropbox.Dropbox(access_token) dropbox_destination = '/live' local_directory = 'C:/Users/xoxo/Desktop/man' for root, dirs, files in os.walk(local_directory): for filename in files: local_path = root + '/' + filename print("local_path", local_path) relative_path = os.path.relpath(local_path, local_directory) dropbox_path = dropbox_destination + '/' + relative_path # upload the file with open(local_path, 'rb') as f: dbx.files_upload(f.read(), dropbox_path)
error:
dropbox.exceptions.ApiError: ApiError('xxf84e5axxf86', UploadError('path', UploadWriteFailed(reason=WriteError('disallowed_name', None), upload_session_id='xxxxxxxxxxx')))
- Mark
Super User II
*moves to API area* - Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/46619550/uploadwritefailedreason-writeerrordisallowed-name-none ]
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 8 hours ago
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!