Skip to content

Use a different YAML parser #114

@mjkramer

Description

@mjkramer

This is really an h5flow issue but I can't seem to create GitHub issues for h5flow. Anyway. Quoting @diaza:

Hey guys, I think I caught a small bug in the gain inputs. When I was using these gain values for the reflow: [...]
I kept getting cwfm outputs with channels 8 and 9 at zero. I think it's because the leading 0s for channels 4-9 are making python read them as octals, and 08 and 09 are undefined as octals (edited)

image

PyYAML only supports YAML 1.1 instead of the slightly-less-insane YAML 1.2, where a leading zero doesn't mean "I'm octal!" Who knows what other silent bugs are being caused by such features of the YAML spec.

ruamel.yaml is probably a good alternative: https://stackoverflow.com/questions/36514166/yaml-octal-integer-generate-errors

There's even https://github.com/meggiman/ruamel.yaml-include to replace pyyaml-include

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions