billpwchan / futu_algo

Futu Algorithmic Trading Solution (Python) 基於富途OpenAPI所開發量化交易程序
Apache License 2.0
394 stars 135 forks source link

run python main_backend.py -b MACD_Cross error #52

Open westeast opened 1 month ago

westeast commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce python main_backend.py -b MACD_Cross

Traceback (most recent call last): File "/Users/lilili/git/shuque/stock/futu_algo/main_backend.py", line 249, in main() File "/Users/lilili/git/shuque/stock/futu_algo/main_backend.py", line 243, in main init_backtesting(args.backtesting) File "/Users/lilili/git/shuque/stock/futu_algo/main_backend.py", line 114, in init_backtesting stock_list = YahooFinanceInterface.get_top_30_hsi_constituents() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lilili/git/shuque/stock/futu_algo/engines/data_engine.py", line 404, in get_top_30_hsi_constituents payload = pd.read_html(r.text)[0] ^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/pandas/io/html.py", line 1240, in read_html return _parse( ^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/pandas/io/html.py", line 1003, in _parse raise retained File "/opt/miniconda3/lib/python3.12/site-packages/pandas/io/html.py", line 983, in _parse tables = p.parse_tables() ^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/pandas/io/html.py", line 249, in parse_tables tables = self._parse_tables(self._build_doc(), self.match, self.attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/pandas/io/html.py", line 598, in _parse_tables raise ValueError("No tables found") ValueError: No tables found

Additional context Add any other context about the problem here.

github-actions[bot] commented 1 month ago

Hello @westeast , thank you for submitting an issue! 👍 We highly appreciate it if you work on it as well.