Micro-sheep / Micro-sheep/efinance

获取全市场基金数据会失败

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.1k
Forks
755
PR merge metrics
No merged PRs in 30d

Description

代码:
```
all_funds_df = ef.fund.get_fund_codes()
all_funds_index = all_funds_df['基金代码'].apply(str).tolist()
funds_base = ef.fund.get_base_info(all_funds_index)
```

会报错:
Processing => 217001: 0%| | 57/15437 [00:01<10:57, 23.39it/s]Traceback (most recent call last):
File "/Users/q/Documents/ws/scan/test/funds.py", line 112, in
save_base_data()
File "/Users/q/Documents/ws/scan/test/funds.py", line 103, in save_base_data
funds_base = ef.fund.get_base_info(all_funds_index)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/efinance/fund/getter.py", line 688, in get_base_info
return get_base_info_muliti(fund_codes)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/efinance/fund/getter.py", line 635, in get_base_info_muliti
Processing => 006539: 0%| | 58/15437 [00:01<10:57, 23.39it/s] start(fund_code)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/multitasking/__init__.py", line 121, in async_method
single.start()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 852, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
Processing => 161505: 14%|█▎ | 2100/15437 [01:13<07:48, 28.47it/s]

MAC和win都不行,大佬看看,怎么获取全市场基金数据?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at efinance/fund/getter.py, especially get_base_info and get_base_info_muliti, using the shown get_fund_codes/get_base_info call as the reproduction. Check the failure around multitasking thread creation and verify that full-market retrieval completes without RuntimeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.