You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ql.save_platform() line should save the dac currents in float format in the runcard
Actual behavior
see image below:
Additional information
This is actually a bug of PyYAML library described in yaml/pyyaml#173
There are some cases that PyYAML dumps floats in scientific notation, but in incorrect format. For example, instead of 4.0e5, 4e5 is stored. Then when reading back the entry is retrieved as string, since it doesn't pass the regex check for floats.
System Information
new-qblox-firmaware branch
Existing GitHub issues
I have searched existing GitHub issues to make sure the issue does not already exist.
HOW will the task be done? Add sub-issues if necessary.
We have to edit the regex pattern of the loader of PyYAML
Instead of doing runcard = yaml.safe_load(stream=file) we should do
Expected behavior
The
ql.save_platform()
line should save the dac currents in float format in the runcardActual behavior
see image below:
Additional information
This is actually a bug of PyYAML library described in yaml/pyyaml#173
There are some cases that PyYAML dumps floats in scientific notation, but in incorrect format. For example, instead of
4.0e5
,4e5
is stored. Then when reading back the entry is retrieved as string, since it doesn't pass the regex check for floats.System Information
Existing GitHub issues
HOW will the task be done? Add sub-issues if necessary.
We have to edit the regex pattern of the loader of PyYAML
Instead of doing
runcard = yaml.safe_load(stream=file)
we should doAlternatively, we can use a different library. Internet suggests using
ruamle.yaml
which is a fork of PyYAML and has this bug fixed.https://yaml.readthedocs.io/en/latest/overview/
The text was updated successfully, but these errors were encountered: