Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'WindowsPath' object is not iterable #1763

Closed
1 task done
JORKER-JQ opened this issue Dec 5, 2024 · 1 comment
Closed
1 task done

TypeError: 'WindowsPath' object is not iterable #1763

JORKER-JQ opened this issue Dec 5, 2024 · 1 comment
Labels
bug Something isn't working Stale

Comments

@JORKER-JQ
Copy link

Search before asking

  • I have searched the Yolo Tracking issues and discussions and found no similar questions.

Yolo Tracking Component

Evaluation

Bug

Traceback (most recent call last):
File "D:\JQ\boxmot-master\tracking\val.py", line 558, in
run_all(opt)
File "D:\JQ\boxmot-master\tracking\val.py", line 438, in run_all
run_generate_dets_embs(opt)
File "D:\JQ\boxmot-master\tracking\val.py", line 366, in run_generate_dets_embs
for y in opt.yolo_model:
TypeError: 'WindowsPath' object is not iterable

Environment

python-3.9

Minimal Reproducible Example

mot_folder_paths = [item for item in Path(opt.source).iterdir()]
for y in opt.yolo_model:
for i, mot_folder_path in enumerate(mot_folder_paths):
dets_path = Path(opt.project) / 'dets_n_embs' / y.stem / 'dets' / (mot_folder_path.name + '.txt')
embs_path = Path(opt.project) / 'dets_n_embs' / y.stem / 'embs' / (opt.reid_model[0].stem) / (mot_folder_path.name + '.txt')
if dets_path.exists() and embs_path.exists():
if prompt_overwrite('Detections and Embeddings', dets_path, opt.ci):
LOGGER.info(f'Overwriting detections and embeddings for {mot_folder_path}...')
else:
LOGGER.info(f'Skipping generation for {mot_folder_path} as they already exist.')
continue
LOGGER.info(f'Generating detections and embeddings for data under {mot_folder_path} [{i + 1}/{len(mot_folder_paths)} seqs]')
generate_dets_embs(opt, y, source=mot_folder_path / 'img1')

@JORKER-JQ JORKER-JQ added the bug Something isn't working label Dec 5, 2024
Copy link

👋 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!

@github-actions github-actions bot added the Stale label Dec 16, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant