from pandas_datareader import data as pdr
import yfinance as yf
yf.pdr_override()
sec = pdr.get_data_yahoo('005930.KS', start='2018-05-04')
여기까지 입력 후 실행하면 아래와 같은 오류가 발생합니다.
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\multitasking__init__.py", line 102, in _run_via_pool
return callee(args, kwargs)
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\multi.py", line 166, in _download_one_threaded
data = _download_one(ticker, start, end, auto_adjust, back_adjust,
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\multi.py", line 178, in _download_one
return Ticker(ticker).history(period=period, interval=interval,
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\base.py", line 155, in history
data = data.json()
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, kwargs)
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\json__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\dg770\AppData\Local\Programs\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)
안녕하세요, 3.4.1. 실습을 하던 중
여기까지 입력 후 실행하면 아래와 같은 오류가 발생합니다.
Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run self._target(*self._args, *self._kwargs) File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\multitasking__init__.py", line 102, in _run_via_pool return callee(args, kwargs) File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\multi.py", line 166, in _download_one_threaded data = _download_one(ticker, start, end, auto_adjust, back_adjust, File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\multi.py", line 178, in _download_one return Ticker(ticker).history(period=period, interval=interval, File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\yfinance\base.py", line 155, in history data = data.json() File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 897, in json return complexjson.loads(self.text, kwargs) File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\json__init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Users\dg770\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\dg770\AppData\Local\Programs\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)
혹시 해결방법을 알 수 있을까요??
감사합니다.