JSON2YOLO
JSON2YOLO copied to clipboard
unsupported operand type(s) for +: 'WindowsPath' and 'str'
Traceback (most recent call last):
File "E:\JSON2YOLO-master\general_json2yolo.py", line 397, in <module>
convert_vott_json(name='data',
File "E:\JSON2YOLO-master\general_json2yolo.py", line 73, in convert_vott_json
name = path + os.sep + name
TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str'
@monkeycc it looks like you are encountering an unsupported operand type error in your general_json2yolo.py script. This issue occurs when trying to concatenate a WindowsPath object with a string using the + operator.
To resolve this, you can convert the WindowsPath object to a string before concatenating it with another string. You can do this by calling the str() function on the WindowsPath object.
After making this change, the concatenation should work as expected and resolve the unsupported operand type error.