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: load() missing 1 required positional argument: 'Loader' #7

Open
sakura-ai opened this issue Jan 18, 2022 · 4 comments
Open

Comments

@sakura-ai
Copy link

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
Copy link

xzjs commented Jan 19, 2022

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

@MindsetFather
Copy link

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

@danialghlm
Copy link

you must change version of yaml to 5.4.1

@RowanWang6
Copy link

change load() to safe_load()

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

5 participants