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

[BUG] Update Labelbox integration to support new API for assigning users to projects #4255

Open
ehofesmann opened this issue Apr 10, 2024 · 0 comments
Labels
bug Bug fixes

Comments

@ehofesmann
Copy link
Member

When attempting to run the code in this section: https://docs.voxel51.com/integrations/labelbox.html#configuring-labelbox-projects

I got this error:

File ~/work/fiftyone/fiftyone/fiftyone/utils/annotations.py:250, in annotate(samples, anno_key, label_schema, label_field, label_type, classes, attributes, mask_targets, allow_additions, allow_deletions, allow_label_edits, allow_index_edits, allow_spatial_edits, media_field, backend, launch_editor, **kwargs)
    245 # Don't allow overwriting an existing run with same `anno_key`, since we
    246 # need the existing run in order to perform workflows like automatically
    247 # cleaning up the backend's tasks
    248 anno_backend.register_run(samples, anno_key, overwrite=False)
--> 250 results = anno_backend.upload_annotations(
    251     samples, anno_key, launch_editor=launch_editor
    252 )
    254 anno_backend.save_run_results(samples, anno_key, results)
    256 return results

File ~/work/fiftyone/fiftyone/fiftyone/utils/labelbox.py:195, in LabelboxBackend.upload_annotations(self, samples, anno_key, launch_editor)
    192 api = self.connect_to_api()
    194 logger.info("Uploading media to Labelbox...")
--> 195 results = api.upload_samples(samples, anno_key, self)
    196 logger.info("Upload complete")
    198 if launch_editor:

File ~/work/fiftyone/fiftyone/fiftyone/utils/labelbox.py:653, in LabelboxAnnotationAPI.upload_samples(self, samples, anno_key, backend)
    651 if members:
    652     for email, role in members:
--> 653         self.add_member(project, email, role)
    655 project_id = project.uid
    656 id_map = {}

File ~/work/fiftyone/fiftyone/fiftyone/utils/labelbox.py:415, in LabelboxAnnotationAPI.add_member(self, project, email, role)
    406     logger.warning(
    407         "Your organization has reached its limit of %d members. "
    408         "Cannot invite new member %s to project '%s'",
   (...)
    411         project.name,
    412     )
    413     return
--> 415 project_role = lbs.organization.ProjectRole(
    416     project=project, role=role_id
    417 )
    419 organization.invite_user(
    420     email, self.roles["NONE"], project_roles=[project_role]
    421 )

AttributeError: module 'labelbox.schema.organization' has no attribute 'ProjectRole'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant