Comments (3)
pykrx 1.0.41
버전에서 정상동작하는데요.
from pykrx import stock
tickers = stock.get_market_ticker_list()
print(tickers)
사용하고 계시는 pykrx
버전이 어떻게 되실까요?
from pykrx.
1.41버전 쓰고 있고 아래와 위 코드 그대로 입력하면 아래처럼 오류가 나옵니다.
Traceback (most recent call last):
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\test.py", line 3, in
tickers = stock.get_market_ticker_list()
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\stock\stock_api.py", line 81, in get_market_ticker_list
date = get_nearest_business_day_in_a_week()
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\stock\stock_api.py", line 67, in get_nearest_business_day_in_a_week
return krx.get_nearest_business_day_in_a_week(date, prev)
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\website\krx_init_.py", line 36, in get_nearest_business_day_in_a_week
df = get_index_ohlcv_by_date(prev, curr, "1001")
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\website\comm\util.py", line 8, in wrapper
return func(*args, **kwargs)
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\website\krx\market\wrap.py", line 819, in get_index_ohlcv_by_date
df = 개별지수시세().fetch(ticker[1:], ticker[0], fromdate, todate)
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\website\krx\market\core.py", line 765, in fetch
result = self.read(indIdx2=ticker, indIdx=group_id, strtDd=fromdate,
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\pykrx\website\krx\krxio.py", line 24, in read
return resp.json()
File "C:\Users\PC\Desktop\LT\python-workspace\crawlingTest-workspace\venv\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 16 column 3 (char 36)
Process finished with exit code 1
from pykrx.
환경이 꼬인것 같은데 가상환경에서 테스트해 보시겠어요? 윈도우 아나콘다 프롬프트에서 다음 명령을 실행하면 됩니다.
$ python -m venv venv
$ venv\Scripts\activate
$ pip install pykrx
그리고 이어서 python을 실행하고 코드를 입력해 보세요.
$ python
from pykrx.
Related Issues (20)
- 파생상품 전종목시세 코드 수정 필요할 것 같습니다 HOT 1
- return 없음 HOT 2
- stock.get_market_price_change('20230815', '20230815', market = "ALL") HOT 5
- AttributeError: module 'pykrx.stock' has no attribute 'get_stock_ticker_list' 문의 HOT 2
- get_index_ohlcv 사용 시 2년 기간 제한 HOT 1
- 해결됐습니다~!
- get_shorting_balance_by_ticker - 일자 딜레이가 있나요? HOT 1
- IP 차단 HOT 1
- get_exhaustion_rates_of_foreign_investment error? HOT 1
- 갑자기 함수에서 아무런 return이 나오지 않습니다. HOT 1
- 동일한 method 호출에 대해서 어떤 경우에는 Empty DataFrame이 응답됩니다. HOT 1
- 공매도 정보 획득시 json의 key값이 'OutBlock_1' 이어서 2년 넘는경우엔 key error 가 납니다. HOT 1
- 특정 날짜의 티커에 대한 종목명을 받을 수가 없어요. HOT 1
- 외국인 지분율 에러 (어쩔땐 잘 되긴한데, 최근에 자주 안됨) HOT 1
- stock.get_market_ohlcv_by_date 거래대금 누락 HOT 1
- get_index_fundamental 함수 정보 누락 HOT 4
- stock.get_market_ohlcv / 'OverflowError: Python int too large to convert to C long 오류
- get_market_ohlcv() 에서 거래량 값이 krx 사이트와 다릅니다. 확인 부탁드립니다.
- 단순히 stock.get_market_ohlcv 실행했는데, "None of [Index(['시가', '고가', '저가', '종가'], dtype='object')] are in the [columns]" 메세지가 나옵니다. HOT 1
- get_market_trading_value_by_date 함수를 실행하면 빈 dataFrame을 가져옵니다. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pykrx.