I got a problem when using sublime. I have several python's envs created by virtualenv,now I want to run my project with one of these env,so I built a new system with the settings below
{
"cmd": ["E:/virtualenv_python36/Scripts/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
but I got an exception when using this system
Traceback (most recent call last):
File "C:\Users\kuo\Desktop\test.py", line 5, in <module>
print(rps.read().decode())
UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position 27237: illegal multibyte sequence
[Finished in 0.3s with exit code 1]
[cmd: ['E:/virtualenv_python36/Scripts/python.exe', '-u', 'C:\\Users\\kuo\\Desktop\\test.py']]
[dir: C:\Users\kuo\Desktop]
[path: C:\ProgramData\Oracle\Java\javapath;D:\Python36\Scripts\;D:\Python36\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\kuo\AppData\Local\Microsoft\WindowsApps;]
here is my test code
import urllib.request
rps = urllib.request.urlopen('http://www.baidu.com')
print(rps.read().decode())