i'm trying to use pyyaml to parse a YML file, but it returns none
import yaml
file = open('items.yml', 'r')
print(file.read())
item_database = yaml.safe_load(file)
print(item_database)
and the YML:
materials:
iron:
difficulty: 1.5
melting_point: 1300
molten_variant: 'molten'
boiling_point: 2800
vapour_variant: 'vapour'
corrosive: false
radioactive: false
half_life: -1
variants:
ore:
replaces: 'iron_ore'
tags:
- 'is_raw'
- 'is_ore'
- 'is_solid'
- 'is_metal'
ingot:
replaces: 'iron_ingot'
tags:
- 'is_forged'
- 'is_solid'
- 'is_metal'
molten:
replaces: 'lava_bucket'
tags:
- 'is_liquid'
- 'is_metal'
plate:
replaces: 'bowl'
tags:
- 'is_liquid'
- 'is_metal'
- 'is_plate'