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
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'
The text was updated successfully, but these errors were encountered:
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.
wzm2256
added a commit
to wzm2256/Labelme2YOLO
that referenced
this issue
Feb 5, 2024
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'
The text was updated successfully, but these errors were encountered: