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

oldhepdata: check for units if qualifier or header is SQRT(S) #40

Open
GraemeWatt opened this issue Aug 4, 2021 · 0 comments
Open

oldhepdata: check for units if qualifier or header is SQRT(S) #40

GraemeWatt opened this issue Aug 4, 2021 · 0 comments
Labels

Comments

@GraemeWatt
Copy link
Member

This line gives an exception AttributeError: 'NoneType' object has no attribute 'lower' if a qualifier with name SQRT(S) has no units:

if name.startswith('SQRT(S)') and units.lower() in ('gev'):

Similarly if SQRT(S) is given as the name of a header without units:

if xheader['name'].startswith('SQRT(S)') and xheader['units'].lower() in ('gev'):

An additional condition should be added to these lines to check that the units are present and not None.

@GraemeWatt GraemeWatt added the bug label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do
Development

No branches or pull requests

1 participant