1. 程式人生 > >scrapy shell 除錯報錯TypeError: module.__init__() takes at most 2 arguments (3 g iven)

scrapy shell 除錯報錯TypeError: module.__init__() takes at most 2 arguments (3 g iven)

1、使用scrapy shell的時候本人之前安裝了ipython,使用shell調式格式從>>>變成了【1】這種帶有ipython的格式,結果整齊度看起來比較舒服。

2、現在建立了crawl spider,同時進入到專案目錄,使用scrapy shell xxxxxxxx在cmd或者cmder中進行調式的報錯TypeError: module.__init__() takes at most 2 arguments (3 g iven),說明了應該是ipython直接運行了pycharm中專案的程式碼,在某一個專案中的一項顯示出了型別錯誤,後來在cmd或者cmder的創始目錄進行scrapy shell xxxxxxxx調式的時候,可以進入其中,可以調式response.css或者response.xpath。