labelme icon indicating copy to clipboard operation
labelme copied to clipboard

无法使用labelme_json_to_dataset

Open wwmwmwm opened this issue 2 years ago • 0 comments

Provide environment information

python3.11 pip list labelme 5.1.1 labelme 5.1.1 lazy_loader 0.1 matplotlib 3.7.1 natsort 8.3.1 networkx 3.0 numpy 1.24.2 opencv-python 4.7.0.72 packaging 23.0 Pillow 9.4.0 pip 23.0.1 pluggy 1.0.0 pygame 2.3.0 pyparsing 3.0.9 PyQt5 5.15.9 PyQt5-Qt5 5.15.2 PyQt5-sip 12.11.1

What OS are you using?

windows 10

Describe the Bug

使用json_to_dataset出现如下错误 This script is aimed to demonstrate how to convert the JSON file to a single image dataset. It won't handle multiple JSON files to generate a real-use dataset. Traceback (most recent call last): File "C:\Users\86158\AppData\Local\Programs\Python\Python311\Scripts\labelme_json_to_dataset-script.py", line 33, in sys.exit(load_entry_point('labelme==5.1.1', 'console_scripts', 'labelme_json_to_dataset')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\86158\AppData\Local\Programs\Python\Python311\Lib\site-packages\labelme-5.1.1-py3.11.egg\labelme\cli\json_to_dataset.py", line 39, in main data = json.load(open(json_file)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\86158\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 293, in load return loads(fp.read(), ^^^^^^^^^ UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 5714: illegal multibyte sequence

Expected Behavior

正常转换

To Reproduce

No response

wwmwmwm avatar Mar 18 '23 05:03 wwmwmwm