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

Error when reading kospi #2

Open
quantcn opened this issue Apr 22, 2021 · 0 comments
Open

Error when reading kospi #2

quantcn opened this issue Apr 22, 2021 · 0 comments

Comments

@quantcn
Copy link

quantcn commented Apr 22, 2021

hello, very interesting work you've done. I have a problem when runing your code. When runing the following code:
import FinanceDataReader as fdr
import datetime as dt
start_date = dt.datetime(2011,1,1)
end_date = dt.datetime(2021,1,1)

kospi = fdr.DataReader('KS11',start_date,end_date)

I get the following error message, any solution?
Traceback (most recent call last):
File "e:/myquant/Adv_Fin_ML/trading-rules-using-machine-learning-main/test.py", line 7, in
kospi = fdr.DataReader('KS11',start_date,end_date)
File "e:\myquant\venv_quant389\lib\site-packages\FinanceDataReader\data.py", line 41, in DataReader
df = reader(symbol, start, end, exchange, data_source).read()
File "e:\myquant\venv_quant389\lib\site-packages\FinanceDataReader\investing\data.py", line 62, in read
curr_id = self._get_currid_investing(self.symbol, self.exchange, self.data_source)
File "e:\myquant\venv_quant389\lib\site-packages\FinanceDataReader\investing\data.py", line 30, in get_currid_investing
jo = json.loads(r.text)
File "E:\ProgramFiles\Python\Python38\lib\json_init
.py", line 357, in loads
return _default_decoder.decode(s)
File "E:\ProgramFiles\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "E:\ProgramFiles\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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

1 participant