Project dataset returns an object

def get_projects_attached_datasets_uid(self, project_id):

        project = self.client.get_project(project_id)
        datasets = project.datasets() 

        dataset_uid_list = []
        for dataset in datasets:
        return dataset_uid_list

The line datasets = project.datasets() returns an object <labelbox.pagination.PaginatedCollection object at 0x7f0ea0396b20>. However, after looping through datasets it’s always empty. And yes, I’m sure that the dataset exists and is attached to this project. If I use the get_datasets() method I get the dataset.

datasets = self.client.get_datasets( == dataset_name)

Is there a way to access the datasets attached to this project from the object?

Hi @uufuoma, are you sure that the projects you are querying are not batch-based?

Any project created recently will be using batch-based queuing, as this is the new standard for all projects on Labelbox.

In fact, the relationship you reference – project.datasets() – will eventually be deprecated, as the concept of attaching datasets to a project will no longer be relevant. Instead, you can call project.batches() and proceed similarly!

Thanks, @Zeke. That worked just fine. Thanks. There have been many changes lately on Labelbox but little documentation to complement them.