pandas-datareader icon indicating copy to clipboard operation
pandas-datareader copied to clipboard

ValueError: No tables found for ticker '5205.KL'

Open aironsholt opened this issue 4 years ago • 6 comments

thanks for a great module! My issue may be ‘hidden’ under another ticker or not an issue at all. If so, please let me know.

I found a ticker which exists on the YF (https://finance.yahoo.com/quote/5205.KL?p=5205.KL) but returns a "ValueError: No tables found" in Python when requesting info:

import yfinance as yf
yf.Ticker('5205.KL').info

Thanks ad advance

Capture

aironsholt avatar Jul 17 '20 20:07 aironsholt

Use 5205-KL instead of 5205.KL

asafravid avatar Nov 11 '20 20:11 asafravid

tried "Use 5205-KL instead of 5205.KL", still doesnt work.

found another sample ticker (1163.KL), its PE RATIO (TTM) is available, but it refuse to show its value. return error "ValueError: No tables found"

either way, appreciate it if anyone have other way to extract not-well-known stock ticker PE Ratio using yfinance (usually Msia stocks)

Thanks!

dwihdyn avatar Mar 03 '21 12:03 dwihdyn

Use 5205.kl NONE-CAPITAL letters https://finance.yahoo.com/quote/5205.kl/ Verified using my open source stock scanner & screener: https://github.com/asafravid/sss

asafravid avatar Mar 03 '21 13:03 asafravid

@asafravid i tried to write script as simple as :

import yfinance as yf
symbol = yf.Ticker("5205.kl").info

and error message still same. below is the complete error message :

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    symbol = yf.Ticker("5205.kl").info
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/ticker.py", line 138, in info
    return self.get_info()
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 423, in get_info
    self._get_fundamentals(proxy)
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 288, in _get_fundamentals
    holders = _pd.read_html(url+'\holders')
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 1100, in read_html
    displayed_only=displayed_only,
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 915, in _parse
    raise retained
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 895, in _parse
    tables = p.parse_tables()
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 213, in parse_tables
    tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
  File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 545, in _parse_tables
    raise ValueError("No tables found")
ValueError: No tables found

Note : i did implement this solution and their #191 thread already, still doesnt work :(

dwihdyn avatar Mar 05 '21 04:03 dwihdyn

Try it using my screener Works for me However note that in yahoo finance there is no data for this company so yfinance won’t have the data either You just have the graph Rest is ‘N/A’

בתאריך יום ו׳, 5 במרץ 2021 ב-6:39 מאת Dwi Hadyan [email protected]:

@asafravid https://github.com/asafravid i tried to write script as simple as :

import yfinance as yf symbol = yf.Ticker("5205.kl").info

and error message still same. below is the complete error message : Traceback (most recent call last): File "test.py", line 3, in symbol = yf.Ticker("5205.kl").info File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/ticker.py", line 138, in info return self.get_info() File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 423, in get_info self._get_fundamentals(proxy) File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 288, in _get_fundamentals holders = _pd.read_html(url+'\holders') File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 1100, in read_html displayed_only=displayed_only, File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 915, in _parse raise retained File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 895, in _parse tables = p.parse_tables() File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 213, in parse_tables tables = self._parse_tables(self._build_doc(), self.match, self.attrs) File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 545, in _parse_tables raise ValueError("No tables found") ValueError: No tables found

Note : i did implement this https://github.com/ranaroussi/yfinance/issues/214 solution and their #191 https://github.com/ranaroussi/yfinance/issues/191 thread already, still doesnt work :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/pandas-datareader/issues/810#issuecomment-791148123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7ZJS6YZXPCOCRUD347CVTTCBOB5ANCNFSM4O62EQPA .

-- Asaf - אסף

asafravid avatar Mar 05 '21 05:03 asafravid

Tested October 16 2021: Code:

import yfinance as yf

symbol = yf.Ticker("5205.kl").info
print(symbol)

Response:

{'exchange': 'KLS', 'shortName': 'SENDAI', 'exchangeTimezoneName': 'Asia/Kuala_Lumpur', 'exchangeTimezoneShortName': 'MYT', 'isEsgPopulated': False, 'gmtOffSetMilliseconds': '28800000', 'quoteType': 'EQUITY', 'symbol': '5205.KL', 'market': 'my_market', 'previousClose': 0.215, 'regularMarketOpen': 0.215, 'twoHundredDayAverage': 0.23708333, 'trailingAnnualDividendYield': None, 'payoutRatio': None, 'volume24Hr': None, 'regularMarketDayHigh': 0.215, 'navPrice': None, 'averageDailyVolume10Day': 232662, 'totalAssets': None, 'regularMarketPreviousClose': 0.215, 'fiftyDayAverage': 0.21652777, 'trailingAnnualDividendRate': None, 'open': 0.215, 'toCurrency': None, 'averageVolume10days': 232662, 'expireDate': None, 'yield': None, 'algorithm': None, 'dividendRate': None, 'exDividendDate': None, 'beta': None, 'circulatingSupply': None, 'startDate': None, 'regularMarketDayLow': 0.215, 'priceHint': 4, 'currency': 'MYR', 'regularMarketVolume': 80000, 'lastMarket': None, 'maxSupply': None, 'openInterest': None, 'marketCap': None, 'volumeAllCurrencies': None, 'strikePrice': None, 'averageVolume': 171975, 'priceToSalesTrailing12Months': None, 'dayLow': 0.215, 'ask': 0.22, 'ytdReturn': None, 'askSize': None, 'volume': 80000, 'fiftyTwoWeekHigh': 0.355, 'forwardPE': None, 'maxAge': 1, 'fromCurrency': None, 'fiveYearAvgDividendYield': None, 'fiftyTwoWeekLow': 0.19, 'bid': 0.21, 'tradeable': False, 'dividendYield': None, 'bidSize': None, 'dayHigh': 0.215, 'regularMarketPrice': 0.215, 'logo_url': ''}
[Finished in 5.8s]

silvavn avatar Oct 16 '21 13:10 silvavn