解决subprocess.CalledProcessError: Command ‘if [ -d .git ]; then git fetch && git status -uno; fi‘ ret

1、问题描述:

在复现YOLOv4_pytorch版本的时候,出现一些报错:subprocess.CalledProcessError: Command 'if [ -d .git ]; then git fetch && git status -uno; fi' returned non-zero exit status 1.,如下图所示。

解决subprocess.CalledProcessError: Command ‘if [ -d .git ]; then git fetch && git status -uno; fi‘ ret_第1张图片

2、解决办法:

找了很多资料都没有解决这个bug,后来也是自己瞎摸索。首先我找到了报错的这两个py文件。一个是utils.py。一个是subprocess.py。这个根据他提示的路径就能找到。

解决subprocess.CalledProcessError: Command ‘if [ -d .git ]; then git fetch && git status -uno; fi‘ ret_第2张图片

解决subprocess.CalledProcessError: Command ‘if [ -d .git ]; then git fetch && git status -uno; fi‘ ret_第3张图片

 找到了这两个出处,然后我把subprocess.py中355行的“check = Ture ”改成了“check = False”

然后解决这个问题了

你可能感兴趣的:(pytorch)