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

requirements: pin PyYAML and add a test for a trailing tab #314

Closed
GraemeWatt opened this issue Feb 23, 2021 · 0 comments · Fixed by #315
Closed

requirements: pin PyYAML and add a test for a trailing tab #314

GraemeWatt opened this issue Feb 23, 2021 · 0 comments · Fixed by #315
Assignees
Labels
complexity: low priority: low type: bug Indicates an unexpected problem or unintended behaviour

Comments

@GraemeWatt
Copy link
Member

I tried to import some records finalised last week (ins763822, ins791177, ins919778) that contain trailing tab characters in the YAML data files. These data files gave exceptions like yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token. This seems to be a long-standing bug in PyYAML (yaml/pyyaml#306 and yaml/pyyaml#450). The problem is avoided by using LibYAML, for example, yaml.CSafeLoader instead of yaml.SafeLoader. With PyYAML 5.3.1 on my laptop (macOS), the LibYAML extension is not automatically included, but this problem is resolved by upgrading to PyYAML 5.4.1 (yaml/pyyaml#407). It seems that the HEPData Docker images (Linux) use LibYAML with both PyYAML 5.3.1 and PyYAML 5.4.1, so this might just be a macOS problem. It can be solved by pinning PyYAML 5.4.1 in requirements.txt. We should also add a test for a trailing tab to check the PyYAML installation.

@GraemeWatt GraemeWatt added type: bug Indicates an unexpected problem or unintended behaviour priority: low complexity: low labels Feb 23, 2021
@GraemeWatt GraemeWatt self-assigned this Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: low priority: low type: bug Indicates an unexpected problem or unintended behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant