Sharpiless / Yolov5-Deepsort

最新版本yolov5+deepsort目标检测和追踪,能够显示目标类别,支持5.0版本可训练自己数据集
GNU General Public License v3.0
997 stars 164 forks source link

TypeError: load() missing 1 required positional argument: 'Loader' #7

Open sakura-ai opened 2 years ago

sakura-ai commented 2 years ago

File "C:\Users\xx\PycharmProjects\try\Yolov5-Deepsort-main\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'

请问提示load()函数调用的时候缺少参数是怎么回事呢?

xzjs commented 2 years ago

self.update(float(fo.read(),Loader=yaml.SafeLoader)),加上缺少的参数就好了

MindsetFather commented 2 years ago

您好,修改后仍然报错:typeError: float() takes no keyword arguments

danialghlm commented 2 years ago

you must change version of yaml to 5.4.1

RowanWang6 commented 2 years ago

change load() to safe_load()