0

thanks for reading. I have to use jupyter light.

An error occurred while using the following code using FinanceDataReader.


import FinanceDataReader as fdr
import ssl
import pandas as pd
import os

start_date = '20200101'
end_date = '20201231'
sample_code = '005930'
stock = fdr.DataReader(sample_code, start = start_date, end = end_date)
stock

error message:

SSLError: HTTPSConnectionPool(host='fchart.stock.naver.com', port=443): Max retries exceeded with url: /sise.nhn?timeframe=day&count=6000&requestType=0&symbol=005930 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

Here's how I tried it:

  1. Why do I keep getting SSL: CERTIFICATE_VERIFY_FAILED] error when using API's?
  • I tried, but DataReader() got an unexpected keyword argument 'session'
  1. https://www.inflearn.com/questions/380807/1-1-%EA%B0%95-financedatareader-%EC%84%A4%EC%B9%98-%EC%98%A4%EB%A5%98
  • I applied the above and performed the following, but I got an error with Parse error at "'--truste'".
import piplite
await piplite.install('finance-datareader --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org')
  1. https://github.com/jupyterlite/jupyterlite/discussions/412
  • it is not deal with financeDataReader library..
  1. While using pandas got error urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
  • There are no errors but it doesn't work.

etc.....

How can i solve this problem..?

ddd
  • 37
  • 6
  • You aren't saying why you have to use JupyterLite? Does someone who knows JupyterLite say FinanceDataReader works with it? From what I see what you posted [here in expanded](https://github.com/financedata-org/FinanceDataReader/issues/173) it needs the `requests` package (see ` /lib/python3.10/site-packages/requests/sessions.py:701` in that post) and pyodide which underlies JupyterLite doesn't work with requests. (Older coverage of that limit is [here](https://bartbroere.eu/2021/11/05/pyodide-requests/) , ... – Wayne Jan 17 '23 at 18:32
  • plus the fact pyodide cannot use the requests module comes up in pyscript a lot too, see [here](https://docs.pyscript.net/latest/guides/http-requests.html).) – Wayne Jan 17 '23 at 18:36

0 Answers0