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

FormatException: Input string was not in a correct format. #15

Open
JohnWinner opened this issue Sep 29, 2017 · 3 comments
Open

FormatException: Input string was not in a correct format. #15

JohnWinner opened this issue Sep 29, 2017 · 3 comments

Comments

@JohnWinner
Copy link

For your information your component is crashing right at initialization:

SentimentIntensityAnalyzer analyzer = new SentimentIntensityAnalyzer();

System.TypeInitializationException: 'The type initializer for 'VaderSharp.SentimentIntensityAnalyzer' threw an exception

FormatException: Input string was not in a correct format.

@JohnWinner
Copy link
Author

I think it's because I have to create the "ConfigStore" somewhere. I'll figure it out...

@codingupastorm
Copy link
Owner

codingupastorm commented Sep 29, 2017

Hey John what version of .NET are you running? And does this happen even if you init in an empty project? If you can reproduce in a sample app I can take a look because it seems to be working okay for me.

@aaad
Copy link

aaad commented Dec 8, 2017

I had the same issue. I think that happens because you try to parse something like a double when German uses a , instead of a . or something...

Workaround:
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;

@codingupastorm If you try to set the CurrentCulture to German it should be reproducable.

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

3 participants