-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Currency not being $ #111
Comments
Hi there :) it’s possible Mouser has recently changed their api. I’m back
from vacation tomorrow and will get this updated right away.
…-Michael
On Mon, Mar 6, 2023 at 3:14 PM rfwerk ***@***.***> wrote:
When importing orders or viewing components on Mouser I get an error as
only '$' is parsed:
2023-03-05
21:11:40.8976|ERROR|Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|An
unhandled exception has occurred while executing the
request.|System.FormatException: The input string '€ 0,141' was
not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status,
ReadOnlySpan`1 value, TypeCode type)
at Binner.Common.Integrations.Models.Mouser.PriceBreak.get_Cost() in
C:\projects\binner\Binner\Library\Binner.Common\Integrations\Models\Mouser\MouserPart.cs:line
63
Code does:
get
{
if (!string.IsNullOrEmpty(Price))
return double.Parse(Price.Replace("$", ""));
return 0;
}
For the moment I will patch my copy to play with it a bit
—
Reply to this email directly, view it on GitHub
<#111>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATJ54V3C7K3FHXG3WR7K3LW2ZHTHANCNFSM6AAAAAAVRUKNCM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I wasn't able to repro this on my end, perhaps you have a part that has no cost associated with it for some reason. However, I have patched the issue regardless and it will be included in v.2.2.6 |
Hi, |
ah - I misunderstood the question, didn't realize you were in EU and Mouser supports euros. I'll fix this properly then - right now ;) |
…e fairly reliable at getting the proper value from the Mouser api.
ok I've implemented a new culture based currency formatter in commit b76e152 it will get merged in with today's release but feel free to test it if you like |
…e fairly reliable at getting the proper value from the Mouser api.
Now available in v2.2.6. Let me know if you are still experiencing the issue |
Hi, now loading web orders or searching components works, thanks. |
Thanks for letting me know - I'll add this to my task list for the next release (next week) to properly internationalize currencies. It definitely was not designed with that in mind at the start, but shouldn't be too difficult to update. |
This happened when I tried to import Mouser order on version 2.6.1, local installation
Same web order number and API keys on the binner.io resulted in more verbose error message:
Let me know if I can enable some additional debugging info or I can (privately) give you the order number and API key to check. |
When importing orders or viewing components on Mouser I get an error as only '$' is parsed:
2023-03-05 21:11:40.8976|ERROR|Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|An unhandled exception has occurred while executing the request.|System.FormatException: The input string '€ 0,141' was
not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, ReadOnlySpan`1 value, TypeCode type)
at Binner.Common.Integrations.Models.Mouser.PriceBreak.get_Cost() in C:\projects\binner\Binner\Library\Binner.Common\Integrations\Models\Mouser\MouserPart.cs:line 63
Code does:
For the moment I will patch my copy to play with it a bit
The text was updated successfully, but these errors were encountered: