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

Improve error message in Python when passing an argument without unit #67

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

prehner
Copy link
Contributor

@prehner prehner commented Oct 23, 2024

from extend_quantity import ideal_gas
ideal_gas(1, 2, 3)
ValueError                                Traceback (most recent call last)
Input In [2], in <module>
----> 1 ideal_gas(1, 2, 23)

ValueError: Missing units! Expected K, got 1.

@prehner prehner force-pushed the python_error_message branch from 9ded3c9 to d33458c Compare October 23, 2024 12:31
@prehner prehner merged commit 8994327 into master Oct 24, 2024
9 checks passed
@prehner prehner deleted the python_error_message branch October 24, 2024 08:28
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

Successfully merging this pull request may close these issues.

1 participant