我正在使用Python 3.7并依赖于 multiprocessing 库,我的代码只使用了请求库,而且我总是用光BlockingIOError: [Errno 35] Resource temporarily unavailable
尽管我尽力排除错误,但没有运气。
错误回溯:
Traceback (most recent call last):
File "sort.py", line 204, in <module>
p.start()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 112, in start
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/popen_fork.py", line 70, in _launch
self.pid = os.fork()
BlockingIOError: [Errno 35] Resource temporarily unavailable
我的代码:
headers = {
// ..
}
proxy = {
'http': 'http://'+Proxy,
"https": 'https://'+Proxy
}
req = requests.post(url,headers=headers,data=data,timeout=10,proxies=proxy)
有人知道怎么了吗?
答案 0 :(得分:0)
两件事:
resp = requests.request("POST", url, data=json.dumps(payload),
headers=headers, verify=False, additional-parameters>)
URL
没有响应并且请求超时时,我看到了这个问题。您是否使用“ curl”检查了一下是否正确?