python - Running scrapy with PyCharm - Debug works but Run does not work -
i met strange issue, running scrapy pycharm:
exact same configuration, debug works, run pycharm not work.
- windows 10
- pycharm 2016.3.3
- scrapy 1.3.3
- python 3.6.0
configuration: pycharm edit configuration page
when attempt debug scrapy, works perfectly. when attempt run scrapy, below error:
c:\users\baib2\appdata\local\programs\python\python36\python.exe c:/users/baib2/appdata/local/programs/python/python36/lib/site-packages/scrapy/cmdline.py crawl scenelist_spider traceback (most recent call last): file "c:/users/baib2/appdata/local/programs/python/python36/lib/site-packages/scrapy/cmdline.py", line 8, in <module import scrapy file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\__init__.py", line 27, in <module . import _monkeypatches file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\_monkeypatches.py", line 20, in <module import twisted.persisted.styles # noqa file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\twisted\persisted\styles.py", line 21, in <module twisted.python.compat import _py3, _pypy file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\twisted\python\__init__.py", line 11, in <module .compat import unicode file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\twisted\python\compat.py", line 612, in <module http import cookiejar cookielib file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\http\__init__.py", line 8, in <module scrapy.http.headers import headers file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\http\__init__.py", line 10, in <module scrapy.http.request import request file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\http\request\__init__.py", line 8, in <module w3lib.url import safe_url_string file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\w3lib\url.py", line 17, in <module six.moves.urllib.request import pathname2url, url2pathname file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\six.py", line 92, in __get__ result = self._resolve() file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\six.py", line 160, in _resolve module = _import_module(self.mod) file "c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\six.py", line 82, in _import_module __import__(name) file "c:\users\baib2\appdata\local\programs\python\python36\lib\urllib\request.py", line 88, in <module import http.client modulenotfounderror: no module named 'http.client' process finished exit code 1
no need attach code because running command:
python3.exe c:\users\baib2\appdata\local\programs\python\python36\lib\site-packages\scrapy\cmdline.py
will produce same error.
i've checked sys.path, comparing run, debug has 1 more path:
'c:\program files (x86)\jetbrains\pycharm 2016.3.3\helpers\pydev'
and don't think shall make difference.
hope can take look, thanks!
menu run>edit configurations enable checkbox "show command line afterwards" helps me
Comments
Post a Comment