You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title stated, the method iter_from_json_file (link) is using the json_file string directly. It caused error because json.load is expecting a file object.
# one taskifdata_type=='dict':
data=json.load(json_file)
foriteminself.annotation_result_from_task(data):
yielditem
If you scroll down a bit, you will see another block using the json_file correctly
# many taskselifdata_type=='list':
withio.open(json_file, 'rb') asf:
logger.debug(f'ijson backend in use: {ijson.backend}')
data=ijson.items(
f, 'item', use_float=True
) # 'item' means to read array of dicts
Should I open create a PR and fix this ? because I am using this library for conversion task. Otherwise I have to manually clone all the code to create my own version...
The text was updated successfully, but these errors were encountered:
As the title stated, the method iter_from_json_file (link) is using the
json_file
string directly. It caused error because json.load is expecting a file object.If you scroll down a bit, you will see another block using the json_file correctly
Should I open create a PR and fix this ? because I am using this library for conversion task. Otherwise I have to manually clone all the code to create my own version...
The text was updated successfully, but these errors were encountered: