Frequently asked questions (FAQ)#

Why do my calls to get_label_rows() time out?#

Label rows can be larger than expected, sometimes containing hundreds of thousands of annotations. When using the bulk retrieve method encord.project.Project.get_label_rows() it is easy to request more labels than would be practical to process, resulting in a slow response and eventually the request timing out.

If you see this method timing out, try reducing the number of labels requested at once.

Why do I see an AuthenticationError when working with label hashes?#

An AuthenticationError can occur when no label hash is present in a label row. To fix this the initialise_labels() method needs to be called before any operation using the label hash can be performed, such as in the example below.

from encord import EncordUserClient, Project

user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
    "<your_private_key>"
)
project: Project = user_client.get_project("<workflows_project_hash>")

label_row = project.list_label_rows_v2()[0]
label_row.initialise_labels()
project.submit_label_row_for_review(label_row.label_hash)