Skip to content

Instantly share code, notes, and snippets.

@vpipkt
Created December 11, 2020 16:59
Show Gist options
  • Save vpipkt/24f3a1e26efcf58c33b471680d5f242d to your computer and use it in GitHub Desktop.
Save vpipkt/24f3a1e26efcf58c33b471680d5f242d to your computer and use it in GitHub Desktop.
labelbox asset metadata
from labelbox import Client, DataRow
ds = Client().get_dataset('ckije80bs2l8m0yag5qc03doo')
drs = ds.data_rows()
dr = next(iter(drs)) # only one datarow in this dataset for now
dr.metadata() # this is a PaginatedCollection. To get the first element
next(iter(dr.metadata()))
## Raises
"""
labelbox/pagination.py in __next__(self)
50 results = self.client.execute(query, self.params)
51 for deref in self.dereferencing:
---> 52 results = results[deref]
53
"""
# i think this is due to the lack of a proper `deref`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment