HumanSignal/label-studio-sdk

Bug: version number cannot be parsed due to recent update

hkmkv opened this issue · 4 comments

There is an issue with the recent change to setup.py, where the version cannot be found.

I am attempting to set up the label studio ml backend in a Docker container and get the following output during build:

21.02 Collecting label_studio_sdk@ git+https://github.com/heartexlabs/label-studio-sdk.git@master (from label-studio-ml@ git+https://github.com/HumanSignal/label-studio-ml-backend.git->-r requirements.txt (line 15))
21.03   Cloning https://github.com/heartexlabs/label-studio-sdk.git (to revision master) to /tmp/pip-install-dzlcr888/label-studio-sdk_7bcaec938f3c4343b22c4b34f5d09da3
21.03   Running command git clone --filter=blob:none --quiet https://github.com/heartexlabs/label-studio-sdk.git /tmp/pip-install-dzlcr888/label-studio-sdk_7bcaec938f3c4343b22c4b34f5d09da3
22.54   Resolved https://github.com/heartexlabs/label-studio-sdk.git to commit 7530be619ac8a262eaa3de9c567e8b2bde6d1640
22.55   Preparing metadata (setup.py): started
22.74   Preparing metadata (setup.py): finished with status 'error'
22.75   error: subprocess-exited-with-error
22.75
22.75   × python setup.py egg_info did not run successfully.
22.75   │ exit code: 1
22.75   ╰─> [7 lines of output]
22.75       Traceback (most recent call last):
22.75         File "<string>", line 2, in <module>
22.75         File "<pip-setuptools-caller>", line 34, in <module>
22.75         File "/tmp/pip-install-dzlcr888/label-studio-sdk_7bcaec938f3c4343b22c4b34f5d09da3/setup.py", line 15, in <module>
22.75           version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
22.75                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22.75       AttributeError: 'NoneType' object has no attribute 'group'
22.75       [end of output]
22.75
22.75   note: This error originates from a subprocess, and is likely not a problem with pip.
22.75 error: metadata-generation-failed

Same here! It wasn't happening yesterday!

Had the same issue myself following the ML Backend install instructions. I changed the requirements.txt line to a commit a few days ago:

# label_studio_sdk from git master branch
label_studio_sdk @ git+https://github.com/HumanSignal/label-studio-sdk.git@e47bf50627d9a8287fc08996d30c404cb3aac407

And everything seems to be working well. I think this is an issue for https://github.com/HumanSignal/label-studio-ml-backend rather than here. The instructions seem to be outdated, and I'd expect installing directly from the latest commit in the master branch is not a great idea.

efcy commented

Hi;
I changed it in the PR: #196 which was merged yesterday. Could you try again? I hope I didn't cause further problems with this PR.

Hi; I changed it in the PR: #196 which was merged yesterday. Could you try again? I hope I didn't cause further problems with this PR.

Hey, I just tried here and the PR fixed it! Thank you for your work!