Coder Social home page Coder Social logo

Comments (3)

mr-yoo avatar mr-yoo commented on August 14, 2024

pykrx 1.0.41 버전에서 정상동작하는데요.

from pykrx import stock

tickers = stock.get_market_ticker_list()
print(tickers)

사용하고 계시는 pykrx 버전이 어떻게 되실까요?

from pykrx.

leetan8909 avatar leetan8909 commented on August 14, 2024

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.

mr-yoo avatar mr-yoo commented on August 14, 2024

환경이 꼬인것 같은데 가상환경에서 테스트해 보시겠어요? 윈도우 아나콘다 프롬프트에서 다음 명령을 실행하면 됩니다.

$ python -m venv venv
$ venv\Scripts\activate
$ pip install pykrx

그리고 이어서 python을 실행하고 코드를 입력해 보세요.

$ python

from pykrx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.