Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

NullPointerException #14

Open
benmccann opened this issue Feb 5, 2018 · 3 comments
Open

NullPointerException #14

benmccann opened this issue Feb 5, 2018 · 3 comments

Comments

@benmccann
Copy link
Contributor

benmccann commented Feb 5, 2018

I typed in a ticker and pressed "Add"

21:33:28.736 [JavaFX Application Thread] DEBUG o.s.t.c.controller.ChartController - Start Yahoo request...
21:33:30.674 [Thread-5] DEBUG o.s.t.c.a.YahooService$CrumbManager - Set cookie from http request: B=0h14n59d7fr59&b=3&s=en
21:33:31.025 [Thread-5] DEBUG o.s.t.c.a.YahooService$CrumbManager - Set crumb from http request: Q4YyQzQoG6o
java.lang.NullPointerException
	at org.sjwimmer.tacharting.chart.model.types.YahooTimePeriod.of(YahooTimePeriod.java:35)
	at org.sjwimmer.tacharting.chart.api.CSVConnector.getSeriesFromYahooFile(CSVConnector.java:102)
	at org.sjwimmer.tacharting.chart.api.YahooService$RequestTimeSeries.call(YahooService.java:150)
	at org.sjwimmer.tacharting.chart.api.YahooService$RequestTimeSeries.call(YahooService.java:69)
	at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at javafx.concurrent.Service.lambda$null$492(Service.java:725)
	at java.security.AccessController.doPrivileged(Native Method)
	at javafx.concurrent.Service.lambda$executeTask$493(Service.java:724)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
@team172011
Copy link
Owner

I think this happens if there is no properties file for api/yahoo. Can you click Api Settings -> Yahoo and than save. This will create the api.properties file in home/tachart/properties

@benmccann
Copy link
Contributor Author

benmccann commented Feb 19, 2018

It seems like the better behavior if this file is missing would be to create it rather than throwing an error. Why should the user have to know to press Api Settings -> Yahoo -> save the first time they use the app?

@team172011
Copy link
Owner

Sure, this was not planed to be the default way. I will fix it soon. But I want to merge other changes before

@team172011 team172011 reopened this Feb 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants