VS2015 'utf-8' codec can't decode byte
近日装好Visual Studio 2015 和PTVS准备练习Python开发,遇到一个棘手的问题,编码错误,提示如下:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd3 in position 2:
invalid continuation byte
有一种临时的解决方案,File-->Advanced Save Options-->Utf-8 without signature 。
可以解决当前文件运行报错问题。

Improvements for 2.2.2
The following significant issues have been resolved:
Fixed incompatibilities with Visual Studio 2015 Update 1
#712 Don't add Unicode BOM by default
#664 Profiler does not handle UTF-8 BOM
#810 Referencing multiple extension modules does not work
#926 Cannot open file when coding comment does not match actual encoding
所以,上官网下载最新版本的PTVS基本上就可以解决问题了。
VS2015 'utf-8' codec can't decode byte的更多相关文章
- pydensecrf安装报错1、UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid start byte2、 LINK : fatal error LNK1158: 无法运行“rc.exe” error: command 'D:\\software\\vs2015\\VC\\BIN
pydensecrf安装报错 1.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid st ...
- python在读取文件时出现 'gbk' codec can't decode byte 0x89 in position 68: illegal multibyte sequence
python在读取文件时出现“UnicodeDecodeError:'gbk' codec can't decode byte 0x89 in position 68: illegal multiby ...
- flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法
flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...
- Python报错UnicodeDecodeError: ascii codec can t decode byte 0xe0 ...解决方法
用命令(python setup.py install)安装webpy时候总是报错 在网上搜索到的解决方法如下: 1. 这是Python 2 mimetypes的bug 2. 需要将Python2.7 ...
- python2.7 报错(UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128))
报错: 原来用的python3.5版本后来改为2.7出现了这个错误里面的中文无法显示 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 ...
- UnicodeDecodeError: 'utf8' codec can't decode byte 0xce in position 47: invalid continuation byte
- Requests库上传文件时UnicodeDecodeError: 'ascii' codec can't decode byte错误解析
在使用Request上传文件的时候碰到如下错误提示: 2013-12-20 20:51:09,235 __main__ ERROR 'ascii' codec can't decode byte 0x ...
- 【Python】【解决】UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 1: ordinal not in range(128)
1.问题描述 今天在升级Ubuntu到14.04,使用命令行启动软件更新器,进行版本升级,结果开始升级就异常退出了,具体打印如下: $update-manager -d 正在检查新版 Ubuntu 使 ...
- setuptools,pip,install,UnicodeDecodeError: 'ascii' codec can't decode byte.原因和解决方案
昨天重装Python2.7.6时,为了安装第三方库,我去下pip.为了装pip,又得先装 ez_setup.py.结果装ez_setup时,遇到了问题,报错: UnicodeDecodeError: ...
随机推荐
- 【翻译】React vs Angular: JavaScript的双向性
翻译原文链接:https://blog.prototypr.io/react-vs-angular-two-sides-of-javascript-b850de22b413 我的翻译小站:http:/ ...
- 【转载】Android 开发 命名规范
原文地址:http://www.cnblogs.com/ycxyyzw/p/4103284.html 标识符命名法标识符命名法最要有四种: 1 驼峰(Camel)命名法:又称小驼峰命名法,除首单词外, ...
- jenkins IOS- ad-hoc 打包
背景 客户无大企业证书,只有开发者证书,如果进行开发分发测试只能采用两种方式 testfight ad-hoc打包 上testfight存在一定的审核时间,排除掉,最后选择打ad-hoc的包 解决 查 ...
- (转)Spring定时任务的几种实现
Spring定时任务的几种实现 博客分类: spring框架 quartzspringspring-task定时任务注解 Spring定时任务的几种实现 近日项目开发中需要执行一些定时任务,比如需要 ...
- BZOJ-1491-社交网络
题目链接:https://vjudge.net/problem/HYSBZ-1491 题目大意:中文题目,题意见题目 题目分析:由于数据量很小,可以考虑进行Floyd算法. 第一次进行Floyd算法, ...
- node.js fs.open 和 fs.write 读取文件和改写文件
Node.js的文件系统的Api //公共引用 var fs = require('fs'), path = require('path'); 1.读取文件readFile函数 //readFile( ...
- Java 三目运算符表达式的一些问题
最近在处理一个需求,需求描述如下:对数据库中查询出来的数据的某一个字段做一个简单处理.处理方式是:如果该字段的值(取值范围0~4,有可能为null)等于0,那么默认处理成1. 测试代码如下: publ ...
- Python实现单词查询&文件查找
最近学C++ Primer,做到第十二章有个习题.要求针对英文文本,对于用户想搜索的单词,打印出该单词在文本中出现的总次数,单词所出现行号及对应的行内容:单词在一行内出现多次,只打印该行一次.C++的 ...
- .net Ajax使用
function CheckUsername() { var strName = $("#txtUserName").val(); $.ajax({ type: "GET ...
- vue-router的使用
关于vue-router的基本使用方法 首先,需要下载vue-router npm install vue-router --save vue-router在html或组件中的展现 ``` &l ...