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.

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: Python error issue with dbx_team.team_member_space_limits_excluded_users_add

Python error issue with dbx_team.team_member_space_limits_excluded_users_add

JohnAdam_CUNY
Helpful | Level 6
Go to solution

I try to run below and get issue cause in Python I cannot seem to find expected type dropbox.team.UserSelectorArg or subtype. I tried adding its as a list directly but that does not work either. Please advise.

user = dbx_team.UserSelectorArg # does not exist in Compiler 
dbx_team.team_member_space_limits_excluded_users_add(user)
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

@JohnAdam_CUNY It seems like your 'dbx_team' variable is probably your 'DropboxTeam' instance. As Здравко said though, you should use the provided dropbox.team.UserSelectorArg (not on a DropboxTeam instance) to access that. For example, there's dropbox.team.UserSelectorArg.email. And as they mentioned, once you have one or more of those, you would put those in a list to pass them to team_member_space_limits_excluded_users_add.

View solution in original post

2 Replies 2

Здравко
Legendary | Level 20
Go to solution

Hi @JohnAdam_CUNY,

There is UserSelectorArg class that you can use, but as element in list. The method expects list, not a single object! You may construct object instance by providing its type and corresponding value. Better use the conveniences methods targeting different union entries though - team_member_id, external_id, and email. 😉

Hope this helps.

 

PS: By the way, in Python there is nothing in compiler - Python is scripting language executed by interpreter. In the Python interpreter is a JIT compiler only (similar to javascript and other scripting languages)! In spite there are some extended ways to cache JIT binaries in Python and loading them instead of the source, there is still nothing in the compiler itself that you may expect or miss (more than syntax checking, for instance).

Greg-DB
Dropbox Staff
Go to solution

@JohnAdam_CUNY It seems like your 'dbx_team' variable is probably your 'DropboxTeam' instance. As Здравко said though, you should use the provided dropbox.team.UserSelectorArg (not on a DropboxTeam instance) to access that. For example, there's dropbox.team.UserSelectorArg.email. And as they mentioned, once you have one or more of those, you would put those in a list to pass them to team_member_space_limits_excluded_users_add.

Need more support?