rooneysh/Labelme2YOLO

Package rasing a Type error

dauntless23 opened this issue · 2 comments

Converting 0006.json for train ...
Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\Compressed\Labelme2YOLO-main\Labelme2YOLO-main\labelme2yolo.py", line 228, in
convertor.convert(val_size=args.val_size)
File "C:\Users\Administrator\Downloads\Compressed\Labelme2YOLO-main\Labelme2YOLO-main\labelme2yolo.py", line 97, in convert
img_path = self._save_yolo_image(json_data,
File "C:\Users\Administrator\Downloads\Compressed\Labelme2YOLO-main\Labelme2YOLO-main\labelme2yolo.py", line 194, in _save_yolo_image
img = utils.img_b64_to_arr(json_data['imageData'])
File "C:\ProgramData\anaconda3\lib\site-packages\labelme\utils\image.py", line 24, in img_b64_to_arr
img_data = base64.b64decode(img_b64)
File "C:\ProgramData\anaconda3\lib\base64.py", line 80, in b64decode
s = _bytes_from_decode_data(s)
File "C:\ProgramData\anaconda3\lib\base64.py", line 45, in _bytes_from_decode_data
raise TypeError("argument should be a bytes-like object or ASCII "
TypeError: argument should be a bytes-like object or ASCII string, not 'NoneType'

That's because your Labelme json format is not bytes, check if your Labelme version is match the requirements. Since this 'utils.img_b64_to_arr' code is provided by Labelme.