You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~\AppData\Local\Programs\Python\Python312\Lib\json_init_.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
341 s = s.decode(detect_encoding(s), 'surrogatepass')
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder
File ~\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337, in JSONDecoder.decode(self, s, _w)
332 def decode(self, s, _w=WHITESPACE.match):
333 """Return the Python representation of s (a str instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
File ~\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 16 column 3 (char 36)
The text was updated successfully, but these errors were encountered:
'0.9.93' 버전인데... 신규 컴퓨터로 최근 1주일전에 라이브러리 설치해서 라이브러리 업데이트 문제는 아닌 거 같습니다.
fdr.StockListing 으로 S&P500등은 잘 불러와 지는데 KOSPI, KRX 등 한국 종목만 불러오는데 에러가 지속 되고 있습니다.
참조하십시오.
[오류]
JSONDecodeError: Expecting value: line 16 column 3 (char 36)
'0.9.93' 버전인데... 신규 컴퓨터로 최근 1주일전에 라이브러리 설치해서 라이브러리 업데이트 문제는 아닌 거 같습니다. fdr.StockListing 으로 S&P500등은 잘 불러와 지는데 KOSPI, KRX 등 한국 종목만 불러오는데 에러가 지속 되고 있습니다. 참조하십시오. [오류] JSONDecodeError: Expecting value: line 16 column 3 (char 36)
finance data reader library는 최신 업데이트 했습니다.
fdr.version
'0.9.93'
JSONDecodeError: Expecting value: line 16 column 3 (char 36)
JSONDecodeError Traceback (most recent call last)
Cell In[8], line 1
----> 1 df_krx = fdr.StockListing('KRX')
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\FinanceDataReader\data.py:158, in StockListing(market, start, end)
156 market = market.upper()
157 if market in ['KRX', 'KOSPI', 'KOSDAQ', 'KONEX', 'KRX-MARCAP']:
--> 158 return KrxMarcapListing(market).read()
159 elif market in ['KRX-DESC', 'KOSPI-DESC', 'KOSDAQ-DESC', 'KONEX-DESC']:
160 return KrxStockListing(market).read()
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\FinanceDataReader\krx\listing.py:20, in KrxMarcapListing.read(self)
18 def read(self):
19 url = 'http://data.krx.co.kr/comm/bldAttendant/executeForResourceBundle.cmd?baseName=krx.mdc.i18n.component&key=B128.bld'
---> 20 j = json.loads(requests.get(url, headers=self.headers).text)
21 date_str = j['result']['output'][0]['max_work_dt']
23 mkt_map = {'KRX-MARCAP':'ALL', 'KRX':'ALL', 'KOSPI':'STK', 'KOSDAQ':'KSQ', 'KONEX':'KNX'}
File ~\AppData\Local\Programs\Python\Python312\Lib\json_init_.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
341 s = s.decode(detect_encoding(s), 'surrogatepass')
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder
File ~\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:337, in JSONDecoder.decode(self, s, _w)
332 def decode(self, s, _w=WHITESPACE.match):
333 """Return the Python representation of
s
(astr
instance334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
File ~\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 16 column 3 (char 36)
The text was updated successfully, but these errors were encountered: