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' #81

Open
saiGo1992 opened this issue Mar 2, 2023 · 1 comment
Open

Comments

@saiGo1992
Copy link

When I run monitor_processing_example, I come across error below:
image
could anyone tell me how to fix this error?

@LumiereWuChu
Copy link

The use of yaml.load(file) was deprecated after YAML 5.1 because it was felt to be insecure, and after 5.1 it was changed to require specifying a loader to disable the execution of arbitrary functions via the default loader (FullLoader), and the load function became more Safe
The following three changes to monitor_spec.py:182 are all valid to resolve the error

monitor_descriptions=MonitorDescriptionList(yaml.load(fp,Loader=yaml.FullLoader))
monitor_descriptions=MonitorDescriptionList(yaml.safe_load(fp))
monitor_descriptions=MonitorDescriptionList(yaml.load(fp,Loader=yaml.CLoader))

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

2 participants