We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

JohnAdam_CUNY's avatar
JohnAdam_CUNY
Helpful | Level 6
8 months ago

Python error issue with dbx_team.team_member_space_limits_excluded_users_add

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)
  • 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.

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    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's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 15 minutes ago
325 Following

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!