Open
Description
As the pyyaml has updated, the load function requires a Loader specified.
In the scripts/semantic_index.py, at line 140, the use of load is simply loading a simple yaml.
As the document suggested, the line
loaded = yaml.load(infile)
can be replaced with
loaded = yaml.safe_load(infile)
to avoid the following error
Traceback (most recent call last):
File "../scripts/semparse.py", line 197, in <module>
main()
File "../scripts/semparse.py", line 82, in main
SEMANTIC_INDEX = SemanticIndex(ARGS.templates)
File "ccg2lambda/scripts/semantic_index.py", line 32, in __init__
self.rules = load_semantic_rules(contents)
File "ccg2lambda/scripts/semantic_index.py", line 140, in load_semantic_rules
loaded = yaml.load(infile)
TypeError: load() missing 1 required positional argument: 'Loader'
Tested with successfully running the tool.
Metadata
Metadata
Assignees
Labels
No labels