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

Calling ureg('-') causes an AssertionError #2124

Open
catsclaw opened this issue Jan 23, 2025 · 0 comments
Open

Calling ureg('-') causes an AssertionError #2124

catsclaw opened this issue Jan 23, 2025 · 0 comments

Comments

@catsclaw
Copy link

I'm reading in text files and trying to identify units in them. I just randomly discovered that calling ureg('-') throws an AssertionError rather than a pint.errors.UndefinedUnitError. It appears to do the same thing for other symbols, like ureg('*').

I could understand maybe throwing an error other than an UndefinedUnitError, but an AssertionError is clearly a bad choice here.

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