Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursion depth error creating AD group #95

Open
rloomer opened this issue Jul 16, 2020 · 0 comments
Open

recursion depth error creating AD group #95

rloomer opened this issue Jul 16, 2020 · 0 comments

Comments

@rloomer
Copy link

rloomer commented Jul 16, 2020

Calling create_group_from_ad_group is returning "maximum recursion depth exceeded while calling a Python object". It's occurring at the point the supplied default_site_role is getting validated against the available site_roles in TableauRestApiBase. But it appears that the recursion error is being cause by the fact that self._site_roles (note the underscore before site_roles) does not exist in TableauRestApiBase which defines it as self.site_roles without the underscore.

From group.py

# Creating a synced ad group is completely different, use this method
# The luid is only available in the Response header if bg sync. Nothing else is passed this way -- how to expose?
def create_group_from_ad_group(self, ad_group_name: str, ad_domain_name: str,
                               default_site_role: Optional[str] = 'Unlicensed',
                               sync_as_background: bool = True) -> str:
    self.start_log_block()
    if default_site_role not in self._site_roles:
        raise InvalidOptionException('"{}" is not an acceptable site role'.format(default_site_role))

From rest_api_base.py

    self.site_roles = (
        u'Interactor',
        u'Publisher',
        u'SiteAdministrator',
        u'Unlicensed',
        u'UnlicensedWithPublish',  # This was sunset at some point
        u'Viewer',
        u'ViewerWithPublish',
        u'ServerAdministrator',
        u'ReadOnly',
        u'Explorer',
        u'ExplorerCanPublish',
        u'SiteAdministratorExplorer',
        u'Creator',
        u'SiteAdministratorCreator'
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant