Python 爬虫 raise self._value IndexError: list index out of range

来源:互联网 发布:电子线路画图软件 编辑:程序博客网 时间:2024/06/05 00:42
Traceback (most recent call last):  File "D:\Program Files (x86)\JetBrains\PyCharm Educational Edition 1.0.1\helpers\pydev\pydev_run_in_console.py", line 66, in <module>    globals = run_file(file, None, None)  File "D:\Program Files (x86)\JetBrains\PyCharm Educational Edition 1.0.1\helpers\pydev\pydev_run_in_console.py", line 28, in run_file    pydev_imports.execfile(file, globals, locals)  # execute the script  File "D:/python/xpth/xpathPractice.py", line 51, in <module>    results = pool.map(spider, page)  File "D:\anzhuang\Anaconda\lib\multiprocessing\pool.py", line 251, in map    return self.map_async(func, iterable, chunksize).get()  File "D:\anzhuang\Anaconda\lib\multiprocessing\pool.py", line 558, in get    raise self._valueIndexError: list index out of range

出现如上所示的错误:
IndexError 下标索引超出序列边界,比如当x只有三个元素,却试图访问x[5]

0 0