Я установил scrapy 1.5.1
на windows 8.1
, используя conda 4.5.11
с:
conda install -c conda-forge scrapy
Я использую Pycharm:
PyCharm 2018.2.4 (Professional Edition)
Build #PY-182.4505.26, built on September 19, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 8.1 6.3
Я установил мой интерпретатор проекта на Anacondapython:
Более того, я настроил конфигурацию отладки и указал свой рабочий каталог на каталог проекта моего паука:
Я установил точку останова в своем коде пауков.Однако, когда я нажимаю отладку, я получаю следующую ошибку на выходе консоли:
"C:\Program Files\Python36\python.exe" "C:\Program Files\JetBrains\PyCharm 2018.2.4\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 54316 --file "C:/Program Files/Anaconda3/Scripts/scrapy.exe" crawl btctalkSpider -o items.csv
pydev debugger: process 632 is connecting
Connected to pydev debugger (build 182.4505.26)
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\tokenize.py", line 390, in find_cookie
line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.2.4\helpers\pydev\pydevd.py", line 1664, in <module>
main()
File "C:\Program Files\JetBrains\PyCharm 2018.2.4\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm 2018.2.4\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2018.2.4\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 11, in execfile
stream = tokenize.open(file) # @UndefinedVariable
File "C:\Program Files\Python36\lib\tokenize.py", line 454, in open
encoding, lines = detect_encoding(buffer.readline)
File "C:\Program Files\Python36\lib\tokenize.py", line 431, in detect_encoding
encoding = find_cookie(first)
File "C:\Program Files\Python36\lib\tokenize.py", line 395, in find_cookie
raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for 'C:/Program Files/Anaconda3/Scripts/scrapy.exe'
Любые предложения, что я делаю неправильно?
Я ценю ваши ответы!