0
Help!在做與scrapy任何我碰到下面的錯誤Python/Scrapy - UnicodeDecodeError
C:\Users\danie>scrapy
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\scrapy.exe\__main__.py", line 5, in <module>
File "c:\python27\lib\site-packages\scrapy\cmdline.py", line 9, in <module>
from scrapy.crawler import CrawlerProcess
File "c:\python27\lib\site-packages\scrapy\crawler.py", line 7, in <module>
from twisted.internet import reactor, defer
File "c:\python27\lib\site-packages\twisted\internet\reactor.py", line 38, in <module>
from twisted.internet import default
File "c:\python27\lib\site-packages\twisted\internet\default.py", line 56, in <module>
install = _getInstallFunction(platform)
File "c:\python27\lib\site-packages\twisted\internet\default.py", line 50, in _getInstallFunction
from twisted.internet.selectreactor import install
File "c:\python27\lib\site-packages\twisted\internet\selectreactor.py", line 18, in <module>
from twisted.internet import posixbase
File "c:\python27\lib\site-packages\twisted\internet\posixbase.py", line 18, in <module>
from twisted.internet import error, udp, tcp
File "c:\python27\lib\site-packages\twisted\internet\tcp.py", line 28, in <module>
from twisted.internet._newtls import (
File "c:\python27\lib\site-packages\twisted\internet\_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "c:\python27\lib\site-packages\twisted\protocols\tls.py", line 63, in <module>
from twisted.internet._sslverify import _setAcceptableProtocols
File "c:\python27\lib\site-packages\twisted\internet\_sslverify.py", line 157, in <module>
verifyHostname, VerificationError = _selectVerifyImplementation()
File "c:\python27\lib\site-packages\twisted\internet\_sslverify.py", line 140, in _selectVerifyImplementation
from service_identity import VerificationError
File "c:\python27\lib\site-packages\service_identity\__init__.py", line 7, in <module>
from . import cryptography, pyopenssl
File "c:\python27\lib\site-packages\service_identity\cryptography.py", line 9, in <module>
from cryptography.x509 import (
File "c:\python27\lib\site-packages\cryptography\x509\__init__.py", line 9, in <module>
from cryptography.x509.base import (
File "c:\python27\lib\site-packages\cryptography\x509\base.py", line 16, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "c:\python27\lib\site-packages\cryptography\x509\extensions.py", line 13, in <module>
from asn1crypto.keys import PublicKeyInfo
File "c:\python27\lib\site-packages\asn1crypto\keys.py", line 22, in <module>
from ._elliptic_curve import (
File "c:\python27\lib\site-packages\asn1crypto\_elliptic_curve.py", line 51, in <module>
from ._int import inverse_mod
File "c:\python27\lib\site-packages\asn1crypto\_int.py", line 56, in <module>
from ._perf._big_num_ctypes import libcrypto
File "c:\python27\lib\site-packages\asn1crypto\_perf\_big_num_ctypes.py", line 31, in <module>
libcrypto_path = find_library('crypto')
File "c:\python27\lib\ctypes\util.py", line 53, in find_library
fname = os.path.join(directory, name)
File "c:\python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 30: ordinal not in range(128)
的最後一件事,我沒有試圖執行與slenium蜘蛛(scrapy爬行XY)是wasnt開始「scrapy startproject命令XY」。從那時起我就不能對scrapy做任何事情,而且我總是會得到這個錯誤。我嘗試重新啓動我的電腦並取消/重新安裝scrapy,但錯誤仍然存在。
即時通訊使用的是Windows 10,scrapy版本1.4.0
是你的複製粘貼逐字?它看起來可能是用戶路徑中的非ascii字符的問題 –
@AlastairMcCormack謝謝,那就是問題所在 – BlackBat