Skip to content

User Group Management doesn't support experimental_enabled on Client #1808

@tommypkeane-gehc

Description

@tommypkeane-gehc

Describe the bug

The Client class has the enable_experimental argument, but the execute() method does not check the self.enable_experimental value.

This means that labelbox.schema.user_group.UserGroup class's methods ignore the enable_experimental even though it's defined as required by that class.

To reproduce

  1. Use method labelbox.schema.user_group.UserGroup()
  2. Pass parameters client=labelbox.Client(api_key="...", enable_experimental=True)
  3. See error: labelbox.exceptions.NetworkError: HTTPSConnectionPool(host='api.labelbox.com', port=443): Max retries exceeded with url: /graphql

Expected behavior

The error should be indicating the experimental URL: /_gql

Screenshots / Videos

N/A

Environment (please complete the following information

  • OS: macOS
  • Python Version: 3.11.x
  • SDK + SDK Version: labelbox@4.0.0
  • Python Environment: poetry.lock

Additional context

N/A

Proposed Fix

Every call to self.client.execute(...) like here:

result = self.client.execute(query, params)

could be updated with self.client.execute(..., experimental=self.client.enable_experimental)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions