天天看点

python爬取使用线程池出现报错:exception calling callback for <;Future at 0x1e8e963ef70 state=finished raised

python爬取使用线程池出现报错:exception calling callback for <Future at 0x1e8e963ef70 state=finished raised TypeError>Traceback (most recent call last):TypeError: ‘NoneType’ object is not callable

问题描述——exception calling callback for <Future at 0x1e8e963ef70 state=finished raised TypeError>Traceback (most recent call last):TypeError: ‘NoneType’ object is not callable

python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised

问题原因

错误分析:

通过上面观察发现虽然报错,但是不影响代码的运行,直接调用了线程池的一个函数,导致里面这个函数没有使用里面的方法使源码出了报错了

解决方法

python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised
python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised
python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised
python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised

改了源代码后,要保存

后面运行代码看看效果

python爬取使用线程池出现报错:exception calling callback for &lt;;Future at 0x1e8e963ef70 state=finished raised