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

Pint is unable to parse its own pretty print #2060

Open
ClaymoreX opened this issue Oct 8, 2024 · 2 comments
Open

Pint is unable to parse its own pretty print #2060

ClaymoreX opened this issue Oct 8, 2024 · 2 comments

Comments

@ClaymoreX
Copy link

When I try to read a value that I've had pint print out in pretty format, I get the following error:

pint.errors.UndefinedUnitError: '×10' is not defined in the unit registry

The value in question is 1/58e6 * ureg.ohm * ureg.meter, which pretty prints to 1.72×10⁻⁸ m·Ω

@dalito
Copy link
Contributor

dalito commented Oct 9, 2024

As far as I know it has never been a clear goal to support such round-tripping. So this is more a feature request than a bug report.

Did you test what is causing the problem, the magnitude 1.72×10⁻⁸ or the unit m·Ω or both?

@ClaymoreX
Copy link
Author

It appears to be the x. If I change the x to an * it parses the rest of it just fine.

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

2 participants