cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Discuss Dropbox Developer & API

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

unknown tag 'banned_member'

unknown tag 'banned_member'

xfoxhack
New member | Level 2
Hello,

I am encountering an issue with the Dropbox Python SDK. While trying to create a shared link with settings, I am receiving "Traceback (most recent call last):
File "C:\Users\Administrator\OneDrive\Desktop\TRYOFFICE\XFOX\xfoxgo.py", line 17, in <module>
shared_link_metadata = dbx.sharing_create_shared_link_with_settings(dropbox_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dropbox\base.py", line 4584, in sharing_create_shared_link_with_settings
r = self.request(
^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dropbox\dropbox_client.py", line 347, in request
deserialized_result = stone_serializers.json_compat_obj_decode(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 977, in json_compat_obj_decode
return decoder.json_compat_obj_decode_helper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 563, in json_compat_obj_decode_helper
return self.decode_union(data_type, obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 658, in decode_union
tag, val = self.decode_union_dict(data_type, obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 676, in decode_union_dict
raise bv.ValidationError("unknown tag '%s'" % tag)
stone.backends.python_rsrc.stone_validators.ValidationError: unknown tag 'banned_member'

2 Replies 2

Здравко
Legendary | Level 20

Hi @xfoxhack,

Unfortunately, the type of API error you meet, is not yet included in Dropbox Python SDK supported error types for that call. Since there is not any additional error type fields (it's type void), as a workaround, you can catch the type 'ValidationError' and compare the content literally. In such a way you can introduce some support (as a patch) for that error in your application till official support if any.

Additional hack might be to put on top of your source (before any other Dropbox related method execution) on global place something like:

from dropbox import sharing as s
s.CreateSharedLinkWithSettingsError._banned_member = s.bv.Void()
s.CreateSharedLinkWithSettingsError._tagmap['banned_member'
  ] = s.CreateSharedLinkWithSettingsError._banned_member

Good luck.

Greg-DB
Dropbox Staff

This error would occur because the user's account is currently banned from creating links.

 

As Здравко noted, the Dropbox Python SDK is not currently updated to handle that particular error properly, so it raises a ValidationError instead, but I'll ask the team to fix that up.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?