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

Empty select_atoms string gives unhelpful error #2112

Open
richardjgowers opened this Issue Oct 18, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@richardjgowers
Member

richardjgowers commented Oct 18, 2018

Calling AtomGroup.select_atoms('') gives: SelectionError: Unknown selection token: 'None'.

Instead, an empty string should get caught and a better error message given ('SelectionError: Empty string)

NB: Seems trivial but calling with empty strings can happen when selection strings are generated algorithmically, eg #1919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment