yaml.load missing required Loader on lunar

Bug #2003693 reported by Adam Collard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
Fix Committed
High
Unassigned

Bug Description

 Building images for v3 streams
Traceback (most recent call last):
  File "/build/config/maas/bin/meph2-build", line 25, in <module>
    call_entry_point("meph2.commands.build_image.main")
  File "/build/config/maas/bin/meph2-build", line 22, in call_entry_point
    sys.exit(getattr(sys.modules[istr], ent)())
  File "/build/config/maas/meph2/commands/build_image.py", line 102, in main
    cfgdata = yaml.load(fp)
TypeError: load() missing 1 required positional argument: 'Loader'

As per CHANGES in pyyaml

* https://github.com/yaml/pyyaml/pull/561 -- always require `Loader` arg to `yaml.load()`

yaml.load() now requires a Loader argument

Related branches

Revision history for this message
Alberto Donato (ack) wrote :

we should probably change to use yaml.safe_load() everywhere

Revision history for this message
John Chittum (jchittum) wrote :

took a quick look, because this is used all the way back to Bionic chroots. `yaml.safeload()` is supported in 3.12, so this approach should be safe across all the releases. I don't know the release history well enough to know when the interface may have changed. since Lunar is on 6.0 right now, seemed like a good idea to check.

Changed in maas-images:
importance: Undecided → High
status: New → In Progress
Changed in maas-images:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.