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
sector_industry_stocks = {}
sector_industry_lists = qs.ths_index_name('行业') #该函数调用正常,获得行业板块有300多个
for sector in sector_industry_lists:
sector_industry_stocks[sector] = qs.ths_index_member(sector) #调用该函数抛出ValueError错误,具体如下:
sector_industry_stocks.head()
错误:
Traceback (most recent call last):
File "C:\Users\84549\Desktop\自己写的策略\强势板块选强势股待上涨趋势短线策略-回测.py", line 25, in
lists = qs.ths_index_member('半导体及元件')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\qstock\data\industry.py", line 45, in ths_index_member
return ths_industry_member(code)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\qstock\data\industry.py", line 125, in ths_industry_member
temp = pd.read_html(res.text)[0]
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 1245, in read_html
return _parse(
^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 1008, in _parse
raise retained
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 988, in _parse
tables = p.parse_tables()
^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 248, in parse_tables
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 603, in _parse_tables
raise ValueError("No tables found")
ValueError: No tables found
请教各位大神,感谢!
The text was updated successfully, but these errors were encountered:
import pandas as pd
import qstock as qs
sector_industry_stocks = {}
sector_industry_lists = qs.ths_index_name('行业') #该函数调用正常,获得行业板块有300多个
for sector in sector_industry_lists:
sector_industry_stocks[sector] = qs.ths_index_member(sector) #调用该函数抛出ValueError错误,具体如下:
sector_industry_stocks.head()
错误:
Traceback (most recent call last):
File "C:\Users\84549\Desktop\自己写的策略\强势板块选强势股待上涨趋势短线策略-回测.py", line 25, in
lists = qs.ths_index_member('半导体及元件')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\qstock\data\industry.py", line 45, in ths_index_member
return ths_industry_member(code)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\qstock\data\industry.py", line 125, in ths_industry_member
temp = pd.read_html(res.text)[0]
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 1245, in read_html
return _parse(
^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 1008, in _parse
raise retained
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 988, in _parse
tables = p.parse_tables()
^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 248, in parse_tables
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\84549\anaconda3\Lib\site-packages\pandas\io\html.py", line 603, in _parse_tables
raise ValueError("No tables found")
ValueError: No tables found
请教各位大神,感谢!
The text was updated successfully, but these errors were encountered: