How to Solve Yolov5 Common Error (Three Errors)

1. detect.py run error: IndexError: list index out of range Reason: Path error
Solution: Add r in front of the path
before the path

2.subprocess.CalledProcessError: Command ‘git tag‘ returned non-zero exit status

Solution: open the python environment and find the subprocess.py in Lib, change the check value to False in line 415.

My path is D:\Miniconda3\envs\pytorch\Lib

3.UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb2 in position 6:invalidstartbyte

Solution: in line 58 of the torch_utils.py file, modify the original decode() to decode(encoding = ‘gbk’)

Read More: