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

为什么会有这个问题? #25

Open
HLKunn opened this issue Dec 6, 2021 · 2 comments
Open

为什么会有这个问题? #25

HLKunn opened this issue Dec 6, 2021 · 2 comments

Comments

@HLKunn
Copy link

HLKunn commented Dec 6, 2021

Traceback (most recent call last):
File "E:/TuXiangChuLi/week14/Yolov5-deepsort-inference/demo.py", line 1, in
from AIDetector_pytorch import Detector
File "E:\TuXiangChuLi\week14\Yolov5-deepsort-inference\AIDetector_pytorch.py", line 6, in
from utils.BaseDetector import baseDet
File "E:\TuXiangChuLi\week14\Yolov5-deepsort-inference\utils\BaseDetector.py", line 1, in
from tracker import update_tracker
File "E:\TuXiangChuLi\week14\Yolov5-deepsort-inference\tracker.py", line 8, in
cfg.merge_from_file("E:/TuXiangChuLi/week14/Yolov5-deepsort-inference/deep_sort/configs/deep_sort.yaml")
File "E:\TuXiangChuLi\week14\Yolov5-deepsort-inference\deep_sort\utils\parser.py", line 23, in merge_from_file
self.update(yaml.load(fo.read()))
TypeError: load() missing 1 required positional argument: 'Loader'

Process finished with exit code 1

@eedasdgfy
Copy link

我也是这个问题

@dong-menghao
Copy link

yaml 5.1版本后弃用了yaml.load(file)这个用法,因为觉得不安全,5.1之后的版本修改了需要指定Loader,通过默认加载​​器(FullLoader)禁止执行任意函数
解决方法:直接在读取yaml文件代码的后面加上 yaml.load(input, Loader=yaml.FullLoader)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants