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

Use a different YAML parser #114

Open
mjkramer opened this issue Mar 19, 2024 · 0 comments
Open

Use a different YAML parser #114

mjkramer opened this issue Mar 19, 2024 · 0 comments
Assignees

Comments

@mjkramer
Copy link
Member

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

@mjkramer mjkramer self-assigned this Mar 19, 2024
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

1 participant