cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

rodrigo-sheetgo
Explorer | Level 4

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 4

Greg-DB
Dropbox Staff

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
Explorer | Level 4

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
Dropbox Staff

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
Explorer | Level 4

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.

Need more support?