Python引入 requests 会报UnicodeDecodeError
谭十二 2017-04-12 03:31:34 UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 7: ordinal not in range(128)
D:\codeSoft\Python2\python.exe "D:\program files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 5504 --file E:/anCode/pycharm/rexx/lesson3/xpathTest3_thread.py
pydev debugger: process 13136 is connecting
Connected to pydev debugger (build 163.10154.50)
Traceback (most recent call last):
File "D:\program files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py", line 1596, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\program files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py", line 974, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:/anCode/pycharm/rexx/lesson3/xpathTest3_thread.py", line 4, in <module>
import requests
File "D:\codeSoft\Python2\lib\site-packages\requests\__init__.py", line 52, in <module>
from .packages.urllib3.contrib import pyopenssl
File "D:\codeSoft\Python2\lib\site-packages\requests\packages\urllib3\contrib\pyopenssl.py", line 47, in <module>
from cryptography import x509
File "D:\codeSoft\Python2\lib\site-packages\cryptography\x509\__init__.py", line 7, in <module>
from cryptography.x509.base import (
File "D:\codeSoft\Python2\lib\site-packages\cryptography\x509\base.py", line 16, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "D:\codeSoft\Python2\lib\site-packages\cryptography\x509\extensions.py", line 14, in <module>
from asn1crypto.keys import PublicKeyInfo
File "D:\codeSoft\Python2\lib\site-packages\asn1crypto\keys.py", line 22, in <module>
from ._elliptic_curve import (
File "D:\codeSoft\Python2\lib\site-packages\asn1crypto\_elliptic_curve.py", line 51, in <module>
from ._int import inverse_mod
File "D:\codeSoft\Python2\lib\site-packages\asn1crypto\_int.py", line 56, in <module>
from ._perf._big_num_ctypes import libcrypto
File "D:\codeSoft\Python2\lib\site-packages\asn1crypto\_perf\_big_num_ctypes.py", line 31, in <module>
libcrypto_path = find_library('crypto')
File "D:\codeSoft\Python2\lib\ctypes\util.py", line 53, in find_library
fname = os.path.join(directory, name)
File "D:\codeSoft\Python2\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 7: ordinal not in range(128)
Process finished with exit code 1