AttributeError: 'str' object has no attribute 'exists'
littleloverlalala opened this issue · 1 comments
Search before asking
- I have searched the Yolov7_StrongSORT_OSNet issues and discussions and found no similar questions.
Yolov7_StrongSORT_OSNet Component
Tracking, Other
Bug
Traceback (most recent call last):
File "D:\huohu\v7StrongSORTOSNet\yolov7\train.py", line 616, in
train(hyp, opt, device, tb_writer)
File "D:\huohu\v7StrongSORTOSNet\yolov7\train.py", line 86, in train
attempt_download(weights) # download if not found locally
File "D:\huohu\v7StrongSORTOSNet\yolov7\utils\google_utils.py", line 22, in attempt_download
if not file.exists():
AttributeError: 'str' object has no attribute 'exists'
Environment
No response
Minimal Reproducible Example
def attempt_download(file, repo=''):
# Attempt file download if does not exist
if not file.exists():
assets = ['yolov7.pt', 'yolov7-tiny.pt', 'yolov7x.pt', 'yolov7-d6.pt', 'yolov7-e6.pt',
'yolov7-e6e.pt', 'yolov7-w6.pt']
#tag = subprocess.check_output('git submodule foreach git log -1 --tags --pretty=%D', shell=True).decode().split()[-1]
tag='v0.1'
name = str(file.name)
if name in assets:
msg = f'{file} missing, try downloading from https://github.com/WongKinYiu/yolov7/releases/'
redundant = False
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!