在用yolov5训练自己的数据集的时候,到train.py这一步,但是报了一个错误,困扰了好久。
错误:
Downloading https://ultralytics.com/assets/Arial.ttf to C:\Users\zkyd\AppData\Roaming\Ultralytics\Arial.ttf...
Traceback (most recent call last):
File "G:\Anaconda\envs\yolo\lib\urllib\request.py", line 1345, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 1040, in _send_output
self.send(msg)
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 980, in send
self.connect()
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 1447, in connect
super().connect()
File "G:\Anaconda\envs\yolo\lib\http\client.py", line 946, in connect
self.sock = self._create_connection(
File "G:\Anaconda\envs\yolo\lib\socket.py", line 844, in create_connection
raise err
File "G:\Anaconda\envs\yolo\lib\socket.py", line 832, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
还有一个错误:
Traceback (most recent call last):
File "G:\yolov5-master\train.py", line 640, in <module>
main(opt)
File "G:\yolov5-master\train.py", line 529, in main
train(opt.hyp, opt, device, callbacks)
File "G:\yolov5-master\train.py", line 112, in train
data_dict = data_dict or check_dataset(data) # check if None
File "G:\yolov5-master\utils\general.py", line 585, in check_dataset
check_font('Arial.ttf' if is_ascii(data['names']) else 'Arial.Unicode.ttf', progress=True) # download fonts
File "G:\Anaconda\envs\yolo\lib\urllib\request.py", line 493, in _call_chain
result = func(*args)
File "G:\Anaconda\envs\yolo\lib\urllib\request.py", line 1388, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "G:\Anaconda\envs\yolo\lib\urllib\request.py", line 1348, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。>
有一种字体,我也下载下来了,我之前看过有人说加上绝对路径,我也试了,
请问有人知道怎么解决嘛