Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

rodrigo-sheetgo's avatar
rodrigo-sheetgo
Explorer | Level 4
6 years ago

SharingFileAccessError (no_permission) while trying to call add_file_member in a CSV file

Hey guys,

 

We have in our system the ability to add user permissions to a specific file in Dropbox. It's currently working pretty well for ".XLSX" files for example. But while debugging, I found that for CSV files are not working and actually giving no permission error instead of something like "not supported". In the documentation, I didn't find anything that mentions this as well. It's really unsupported? Are you guys planning to implement this also for CSV files?

 

Thanks.

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    The particular file type shouldn't matter when sharing a file. I'll be happy to help with this issue, but I'll need some more information. Please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but please don't include your access token
    • the full text of the error or unexpected output
  • rodrigo-sheetgo's avatar
    rodrigo-sheetgo
    Explorer | Level 4
    6 years ago

    Hi Greg-DB 

     

    Thanks for the response.

     

    Please follow the answers to your questions:

    • we are using the Dropbox library for Python (9.5.0)
    • Code Snippet:
      • try:
            members_selectors = []
            for member_email in members:
                member_selector = MemberSelector.email(member_email)
                members_selectors.append(member_selector)
            self.service.sharing_add_file_member(file_id, members_selectors, access_level=AccessLevel.editor, quiet=True)
        except ApiError as e:
            raise Exception(repr(e))
    • Error:
      • > e.error
        > AddFileMemberError('access_error', SharingFileAccessError('no_permission', None))
        
        > e.args
        >AddFileMemberError('access_error', SharingFileAccessError('no_permission', None))
        invalid_comment:AddFileMemberError('invalid_comment', None)
        other:AddFileMemberError('other', None)
        rate_limit:AddFileMemberError('rate_limit', None)
        _access_error_validator:<dropbox.stone_validators.Union object at 0x7fdea329ce48>
        _catch_all:'other'
        _get_val_data_type:<bound method Union._get_val_data_type of <class 'dropbox.sharing.AddFileMemberError'>>
        _invalid_comment_validator:<dropbox.stone_validators.Void object at 0x7fdea32432e8>
        _is_tag_present:<bound method Union._is_tag_present of <class 'dropbox.sharing.AddFileMemberError'>>
        _other_validator:<dropbox.stone_validators.Void object at 0x7fdea3243390>
        _permissioned_tagmaps:{}
        _process_custom_annotations:<bound method AddFileMemberError._process_custom_annotations of AddFileMemberError('access_error', SharingFileAccessError('no_permission', None))>
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    I see, thanks for the information, and apologies, I didn't realize you were talking about using the 'AccessLevel.editor' level. For this level, the ability to edit the file will depend on the the cloud editor integrations, such as for "Google Sheets" and "Excel for the web". These integrations don't support .csv files unfortunately. I'll pass this along as a feature request though.

     

    You can still share .csv files like this, but you'd need to either use the AccessLevel.viewer level, or instead share a parent folder using sharing_share_folder/sharing_add_folder_member.

  • rodrigo-sheetgo's avatar
    rodrigo-sheetgo
    Explorer | Level 4
    6 years ago

    Hey, Greg-DB 

     

    Sorry that I wasn't so clear about setting the user as an editor, not just as a viewer. Thanks for the tips for the parent folder and access level viewer. But right now we really would need in this case the editor one. Thanks for taking this as a feature.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!