赞
踩
D:\ProgramData\Anaconda3\envs\yolov5\python.exe D:/yxt/yolov5-master/train.py
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\yolov5\lib\site-packages\git\__init__.py", line 140, in <module>
refresh()
File "D:\ProgramData\Anaconda3\envs\yolov5\lib\site-packages\git\__init__.py", line 127, in refresh
if not Git.refresh(path=path):
File "D:\ProgramData\Anaconda3\envs\yolov5\lib\site-packages\git\cmd.py", line 455, in refresh
raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial message can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|silent|none|n|0: for no message or exception
- warn|w|warning|log|l|1: for a warning message (logged at level CRITICAL, displayed by default)
- error|e|exception|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:/yxt/yolov5-master/train.py", line 100, in <module>
GIT_INFO = check_git_info()
File "D:\ProgramData\Anaconda3\envs\yolov5\lib\contextlib.py", line 75, in inner
return func(*args, **kwds)
File "D:\yxt\yolov5-master\utils\general.py", line 375, in check_git_info
import git
File "D:\ProgramData\Anaconda3\envs\yolov5\lib\site-packages\git\__init__.py", line 142, in <module>
raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial message can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|silent|none|n|0: for no message or exception
- warn|w|warning|log|l|1: for a warning message (logged at level CRITICAL, displayed by default)
- error|e|exception|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
Process finished with exit code 1
通过查询网友的解释,可能时因为yolov5的获取方式时直接下载的zip导致的,不是通过git方式下载会出现这个问题,可以通过以下解决
在cmd.py中
import os
os.environ["GIT_PYTHON_REFRESH"] = "quiet"
import signal
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 234: illegal multibyte sequence
COMET INFO: Couldn't find a Git repository in 'D:\\yxt\\yolov5-master' nor in any parent directory. Set `COMET_GIT_DIRECTORY` if your Git Repository is elsewhere.
COMET WARNING: Unknown error exporting current conda environment
在修改自己的数据集时,往往时通过复制coco128.yaml文件再修改得到,这时候自己的yaml文件中可能存在不能解释的字符,以下两种方式都可以解决,
第一种:
# parent
# ├── yolov5
# └── datasets
# └── coco128 ← downloads here (7 MB)
第二种,也可以修改成如下所示:
# parent
# |--yolov5
# |--datasets
# |--coco128 <- downloads here (7 MB)
COMET INFO: Couldn't find a Git repository in 'D:\\yxt\\yolov5-master' nor in any parent directory. Set `COMET_GIT_DIRECTORY` if your Git Repository is elsewhere.
COMET WARNING: Unknown error exporting current conda environment
这个报错暂时未修改,因为没有影响到训练。
raise Exception("Dataset not found ❌") Exception: Dataset not found ❌
这种问题通常是设置的数据集路径不对
要注意路径的datasets通常时与yolov5的工程路径在同一级目录下,不能放到yolov5工程目录下,修改目录即可以解决。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。