HumanSignal / label-studio-converter

Tools for converting Label Studio annotations into common dataset formats
https://labelstud.io/
255 stars 132 forks source link

bug in "iter_from_json_file" method #246

Open Surya291 opened 1 year ago

Surya291 commented 1 year ago

`

  if data_type == 'dict':
        data = json.load(json_file)
        for item in self.annotation_result_from_task(data):
            yield item

`

find this snippet at : label_studio_converter/converter.py , line : 360

json.load expects an fp , but according to arguments in this method json_file is a str (path of the file).

Please add a snippet to open the file as fp and use json.loads

Thanks!