Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: can't start new thread #20

Closed
leothronton opened this issue May 11, 2021 · 1 comment
Closed

RuntimeError: can't start new thread #20

leothronton opened this issue May 11, 2021 · 1 comment

Comments

@leothronton
Copy link

爬取进度:[# ] 7%Process GetPageByWebWithAnotherProcessAndMultiThreading-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/pi/Documents/myPython/FundCrawler-Dev/CrawlingCore.py", line 115, in run
t.start()
File "/usr/lib/python3.7/threading.py", line 847, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
can't start new threadcan't start new thread
^CTraceback (most recent call last):
File "CrawlingFund.py", line 139, in
crawling_fund(fund_list)
File "CrawlingFund.py", line 74, in crawling_fund
a_result = result_queue.get()
File "/usr/lib/python3.7/multiprocessing/queues.py", line 94, in get
res = self._recv_bytes()
File "/usr/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
buf = self._recv_bytes(maxlength)
File "/usr/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/usr/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
chunk = read(handle, remaining)
KeyboardInterrupt

能不能加个参数控制一下线程的数量?

@Jerry1014
Copy link
Owner

CrawlingCore.GetPageByWebWithAnotherProcessAndMultiThreading
这个类里面,改个一两行就行

最近一段时间都没空维护的说

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants