天天看點

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