|
ceshi='''
www.xxx.com/xx
www.xxx.com/xxx
'''
if __name__ == '__main__':
pool=Pool()
pool.map(get_list_url,[ceshi])
错误码是
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 535, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 298, in _error_catcher
yield
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 590, in read_chunked
self._update_chunk_length()
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 539, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/requests/models.py", line 703, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 428, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 618, in read_chunked
self._original_response.close()
File "/usr/local/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 316, in _error_catcher
raise ProtocolError('Connection broken: %r' % e, e)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/local/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/muu/PycharmProjects/58tongcheng/urldownload.py", line 16, in get_list_url
obj=sessionss.get(url,headers=headers)
File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 641, in send
r.content
File "/usr/local/lib/python3.5/site-packages/requests/models.py", line 781, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/usr/local/lib/python3.5/site-packages/requests/models.py", line 706, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/muu/PycharmProjects/58tongcheng/urldownload.py", line 565, in <module>
pool.map(get_list_url,[list_58])
File "/usr/local/lib/python3.5/multiprocessing/pool.py", line 260, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/local/lib/python3.5/multiprocessing/pool.py", line 608, in get
raise self._value
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
|
|