HumanSignal / label-studio-sdk

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

fix: version parsing in setup.py #196

Closed efcy closed 8 months ago

efcy commented 8 months ago

Fixed installing of the package. I used pip install -e . inside the repo folder to test that it did'nt worked before and now works. Tested this in python 3.10.

Error I got before was:

Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/my/cool/path/label-studio-sdk/setup.py", line 16, in <module>
          version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
      AttributeError: 'NoneType' object has no attribute 'group'
efcy commented 8 months ago

Ups I saw https://github.com/HumanSignal/label-studio-sdk/pull/192 too late. There is another way to fix this.