HumanSignal / label-studio-sdk

Label Studio SDK
https://api.labelstud.io
Apache License 2.0
99 stars 61 forks source link

Cannot authenticate with username and password #134

Closed betamaxed closed 1 year ago

betamaxed commented 1 year ago

Repro steps:

url = "http://localhost:8080"
username = "myusername"
password = "mypassword"
creds = label_studio_sdk.client.ClientCredentials(email=username, password=password)
client = label_studio_sdk.Client(url, None, credentials=creds)

Expected result: Client is created without issue.

Actual result: AttributeError: 'Client' object has no attribute 'cookies'

Underlying issue: https://github.com/heartexlabs/label-studio-sdk/blob/c3f77cd82c3c9577696c801c498c72b45b24415c/label_studio_sdk/client.py#LL94C14-L94C21

self.cookies is referenced before it is initialized.

jombooth commented 1 year ago

looks like this was fixed in #135 which has now been merged (thanks, @betamaxed!). Please reopen if there are still issues with creating the client.