Как отладить Scrapy в VSCode - PullRequest
       98

Как отладить Scrapy в VSCode

0 голосов
/ 30 апреля 2020

введите описание изображения здесь

Как я могу отладить мой scrapy проект в VSCode? Выдает ошибку, как на изображении

Файл "C: \ Python36-32 \ lib \ runpy.py", строка 193, в _run_module_as_main " main ", mod_spe c ) Файл "C: \ Python36-32 \ lib \ runpy.py", строка 85, в _run_code exe c (code, run_globals) Файл "c: \ Users \ p c .vscode \ extensions \ ms- python. python -2020.4.76186 \ pythonFiles \ lib \ python \ debugpy \ no_wheels \ debugpy \ launcher__main __. py ", строка 86, в файле main ()" c: \ Users \ p c .vscode \ extensions \ ms- python. python -2020.4.76186 \ pythonFiles \ lib \ python \ debugpy \ no_wheels \ debugpy \ launcher__main __. Py ", строка 42, в основном файле launcher.connect (launcher_port) «c:. \ Users \ р c .vscode \ расширения \ ms- python python -2020.4.76186 \ pythonFiles \ Lib \ питон \ debugpy \ no_wheels \ debugpy \ пусковая /../ .. \ debugpy \ launcher__init __. py ", строка 27, в connect sock.connect ((" 127.0.0.1 ", launcher_port)) ConnectionRefusedError: [WinError 10061] Не удалось установить соединение, поскольку целевая машина активно отказывала в этом PS C: \ Python36-32 \ dlh c>

* 10 10 * Мой код: импорт ОС из scrapy.cmdline импорт выполнить

os.chdir (os.path.dirname (os.path.realpath ( file )) )

try: execute (['scrapy', 'crawl', 'dlh c', '-o', 'out. json',])), кроме SystemExit: pass

...