client.get_projects() get TypeError
githubfzq opened this issue · 4 comments
githubfzq commented
from label_studio_sdk import Client
ls = Client(url='some_url',
api_key='some_key')
If checking connection, that's ok:
ls.check_connection()
{'status': 'UP'}
but if list projects
ls.get_projects()
get TypeError:
TypeError: list indices must be integers or slices, not str
I also tried installing this package from github directly, not working either.
pip show label-studio-sdk
Name: label-studio-sdk
Version: 0.0.6
Summary: Label Studio annotation tool
Home-page: https://github.com/heartexlabs/label-studio-sdk
Author: Heartex
Author-email: hello@heartex.ai
License: UNKNOWN
Location: /home/fzq/miniconda3/envs/pharm/lib/python3.8/site-packages
Requires: lxml, requests, pydantic
Required-by:
makseq commented
@githubfzq what is your LS version?
githubfzq commented
@githubfzq what is your LS version?
It's 1.1.0. I built LS by docker image.
╔═════════════════════════════════════╗
║ ║
║ Update available 1.1.0 → 1.4 ║
║ Run pip install -U label-studio ║
║ ║
╚═════════════════════════════════════╝
Label Studio version: 1.1.0
{
"label-studio-os-package": {
"version": "1.1.0",
"short_version": "1.1",
"latest_version_from_pypi": "1.4",
"latest_version_upload_time": "2021-11-19T15:56:02",
"current_version_is_outdated": true
},
"label-studio-os-backend": {
"message": "ML model version select (#1126)",
"commit": "a5204ce48ed54188ce13c51461fb2fb47b282368",
"date": "2021-07-05 23:32:57 +0300",
"branch": "master",
"version": "1.1.0+12.ga5204ce.dirty"
},
"release": "1.1.0",
"label-studio-frontend": {
"message": "Merge pull request #219 from heartexlabs/fix/switching-annotations-wit ...",
"commit": "6f3fc50a12b8698186917429cca2c3cae743810a",
"branch": "master",
"date": "2021-07-01T23:31:27Z"
},
"dm2": {
"message": "Don't close QuickView by Enter",
"commit": "d12a691d1e941768c3067ccb15abe5498f8a453b",
"branch": "master",
"date": "2021-06-30T16:06:22Z"
},
"label-studio-converter": {
"version": "0.0.29"
}
}
makseq commented
Could you try to use 1.4?
githubfzq commented
Could you try to use 1.4?
Solved! Thanks!