1. 程式人生 > >記一個莫名巧妙的錯誤,關於python的Scrapy

記一個莫名巧妙的錯誤,關於python的Scrapy

好早就安裝好了scrapy,今天跟著視訊教程新建專案時卻總是報錯

D:\Study\Python\Scrapy>scrapy startproject Itcast
Traceback (most recent call last):
  File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\python36\Scripts\scrapy.exe\__main__.py", line 9, in <module>
  File "c:\python36\lib\site-packages\scrapy\cmdline.py", line 150, in execute
    _run_print_help(parser, _run_command, cmd, args, opts)
  File "c:\python36\lib\site-packages\scrapy\cmdline.py", line 90, in _run_print
_help
    func(*a, **kw)
  File "c:\python36\lib\site-packages\scrapy\cmdline.py", line 157, in _run_comm
and
    cmd.run(args, opts)
  File "c:\python36\lib\site-packages\scrapy\commands\startproject.py", line 109
, in run
    ProjectName=string_camelcase(project_name))
  File "c:\python36\lib\site-packages\scrapy\utils\template.py", line 9, in rend
er_templatefile
    with open(path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'Itcast\\Itcast\\setting
s.py.tmpl'

嘗試很多方法無果,最終通過重新安裝scrapy庫後成功