shirosaidev / stocksight

Stock market analyzer and predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis
https://shirosaidev.github.io/stocksight/
Apache License 2.0
2.12k stars 463 forks source link

issue in stockprice.py #14

Closed aagrawal2017 closed 4 years ago

aagrawal2017 commented 5 years ago

On running the command: python stockprice.py -s TSLA --debug

I got this error. Please help me to solve this one:

2019-05-09 11:41:25,510 [INFO][stocksight] Adding stock data to Elasticsearch... 2019-05-09 11:41:25,562 [WARNING][elasticsearch] POST http://localhost:9200/stocksight/stock [status:400 request:0.048s] 2019-05-09 11:41:25,566 [DEBUG][elasticsearch] > {"symbol": "TSLA", "price_last": 244.75999450683594, "date": "2019-05-09T06:11:25", "change": 0.01634246728233062, "price_high": 244.88389587402344, "price_low": 244.66140747070312, "vol": 97861} 2019-05-09 11:41:25,570 [DEBUG][elasticsearch] < {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [stocksight] as the final mapping would have more than 1 type: [tweet, stock]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [stocksight] as the final mapping would have more than 1 type: [tweet, stock]"},"status":400} 2019-05-09 11:41:25,574 [ERROR][stocksight] Exception: can't get stock data, trying again later, reason is TransportError(400, 'illegal_argument_exception', 'Rejecting mapping update to [stocksight] as the final mapping would have more than 1 type: [tweet, stock]') 2019-05-09 11:41:25,574 [INFO][stocksight] Will get stock data again in 120 sec...

shirosaidev commented 5 years ago

I think you are using Elasticsearch 6, stocksight requires ES 5.6.x

niraj97 commented 5 years ago

will Elasticsearch 7 not work with the project?

niraj97 commented 5 years ago

Can you please take some time to explain how to completely run your project from the beginning. That would help a lot. I read the Radme file but still got many errors.

niraj97 commented 5 years ago

i think the stockprice.py yahoo finance is discontinued and it needs to be updated

shirosaidev commented 5 years ago

@niraj97 I just tested with python3.6.5 and stockprice.py works.. what error do you get? Are you using ES 5.6.x?

entrpn commented 5 years ago

Great work @shirosaidev.

I forked this repo and it works with 7.2 https://github.com/entrpn/stocksight if anyone needs it.

shirosaidev commented 5 years ago

@entrpn always looking for contributors, please consider putting your new features/changes back into the project with PR.