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

Rounding issue in certain scenarios #24

Open
Sneakpeakcss opened this issue Oct 13, 2023 · 12 comments
Open

Rounding issue in certain scenarios #24

Sneakpeakcss opened this issue Oct 13, 2023 · 12 comments

Comments

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 13, 2023

test.mp4

While lb -> g is quite precise, the opposite g -> lb has its issues where anything below 227 g calculates as 0, additionally rounding in this case results in not very good precision.

I haven't tested or encountered any other 'wrong' conversions, but it's possible that it behaves similary in other scenarios.

@deefrawley
Copy link
Owner

What version of the plugin are you running? Looks like an older one. You should be on v2.0.1

@Sneakpeakcss
Copy link
Author

What version of the plugin are you running? Looks like an older one. You should be on v2.0.1

That's exactly the one i'm using, also no additional updates are shown in FlowLauncher.

@deefrawley
Copy link
Owner

Not sure what is happening as I can't replicate the problem.

image

Could you try uninstalling and reinstalling the plugin?

@Sneakpeakcss
Copy link
Author

image
Even before that i've compared and even replaced the files with current release from repo, but unfortunately even Flow uninstall/install didn't change a thing and there's nothing in its log file beside the default initialization INFO.

I wonder if this has something to do with the same issue that happens in Color plugin though.

WIN10 22H2
FlowLauncher: 1.16.2
General Converter: 2.0.1
2023-10-14.txt

@Sneakpeakcss
Copy link
Author

Sneakpeakcss commented Oct 14, 2023

I wonder if this has something to do with the same issue that happens in Color plugin though.

image

Yea, exactly that.

@deefrawley
Copy link
Owner

I'm not sure if that's a Flow core code issue or an individual plugin issue. Do other plugins work ok? I'll keep an eye on that color issue and see if anything comes up I can fix here.

@Sneakpeakcss
Copy link
Author

Other than that, everything works without any issues. However, i can't say that i use any other plugins that would require commas or decimals. If you can think of any that work in a similar way then i can check them for any weird behaviour regarding that.

If anything, i'm surprised that this plugin didn't crash like it happens with colors. And while i have no idea how it works internally, it seems a bit odd that two different plugins, written in two different languages, are having the same problem with "Regional Format" when it's not set to english, so at this point betting on Flow being the culprit seems reasonable.

@Sneakpeakcss
Copy link
Author

As a workaround it looks like changing

- locale.setlocale(locale.LC_NUMERIC, "")
+ locale.setlocale(locale.LC_NUMERIC, "en_US.utf8")

works without any issues (for now) and doesn't force me to change Regional Format in Windows.

@Gurrrra
Copy link

Gurrrra commented Jan 15, 2024

I just installed Flow together with General Converter and Currency Converter and both of the round most of the stuff. Can't really see a pattern which does gets round and what doesn't, but I'd say 75% of my results gets rounded.

And btw, having "weight" or whatever is being converted in large and the result in small feels like the wrong way round :)

@skosara
Copy link

skosara commented Feb 6, 2024

Hi, I have the same problem, trying to convert 5 ft to m I get 2 meters which is not correct, when i try 2 m ft I get 7 meters which also is not correct.
I am using the version 2.0.1

@RePacked
Copy link

RePacked commented Jul 3, 2024

As a workaround it looks like changing

- locale.setlocale(locale.LC_NUMERIC, "")
+ locale.setlocale(locale.LC_NUMERIC, "en_US.utf8")

works without any issues (for now) and doesn't force me to change Regional Format in Windows.

Thanks, this fixed the issue for me as well.

@deefrawley
Copy link
Owner

Hi, I have the same problem, trying to convert 5 ft to m I get 2 meters which is not correct, when i try 2 m ft I get 7 meters which also is not correct. I am using the version 2.0.1

I can't replicate. Are you using a different regional format like others above? Minimum precision should be 3 decimal places.

image

image

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

5 participants