环境win10+anaconda2

在安装labelme时遇到了这个问题,其实跟labelme没啥关系,主要是python2读取中文路径时报错,因为默认编码是ASCII,不认识中文,看到有一个一次性解决的办法https://www.cnblogs.com/kevingrace/p/5893121.html

不过一时之间没有找到anaconda里面python的路径,索性直接换成python3,并在python3下又安装了labelme,问题解决。

ERROR (UnicodeEncodeError): 'ascii' codec can't encode character u'\uff08' in position 9: ordinal not in range(128)的更多相关文章

  1. Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ordinal not in range(128)”问题解决办法

    Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ...

  2. UnicodeEncodeError: 'ascii' codec can't encode character u'\u5929' in position 2: ordinal not in range(128)

    UnicodeEncodeError: 'ascii' codec can't encode character u'\u5929' in position 2: ordinal not in ran ...

  3. UnicodeEncodeError: 'ascii' codec can't encode character u'\u65e0' in position 1: ordinal not in range(128)

    UnicodeEncodeError: 'ascii' codec can't encode character u'\u65e0' in position 1: ordinal not in ran ...

  4. UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 7: ordinal not in range(128) [duplicate]

    Python在往文件里写东西的时候,如果ascii码报错 参考 http://stackoverflow.com/questions/19833440/unicodeencodeerror-ascii ...

  5. 【Python】解决UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 0: ordinal not in range(128)

    指定文件字符集为utf-8 在文件头部加入以下代码: import sys reload(sys) sys.setdefaultencoding('utf-8')

  6. UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u8888′ in position 0: ordinal not in range(168)

    python保存文件UnicodeEncodeError以及reload(sys)后print失效问题 在将字符串写入文件时,执行f.write(str),后台总是报错:UnicodeEncodeEr ...

  7. 数据库连接 UnicodeEncodeError: 'latin-1' codec can't encode character u'\u4eac' in position 0: ordinal not in range(256),UnicodeEncodeError: 'latin-1' codec can't encode character

    处理方法就是,设置连接和游标的charset为你所希望的编码,如utf8, 连接数据库的时候加上   charset="utf8 db = MySQLdb.connect(host= '14 ...

  8. UnicodeEncodeError: 'ascii' codec can't encode character u'\u5728' in position 1

    s = "图片picture"print chardet.detect(s) for c in s.decode('utf-8'): print c UnicodeEncodeEr ...

  9. 解决:"UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position"错误

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/Haiyang_Duan/article/ ...

随机推荐

  1. c#指定程序运行指定文件(太好了,终于找到了)

    System.Diagnostics.Process.Start(@"Notepad.exe", "e:\\a.txt"); System.Diagnostic ...

  2. 用JS写一个简单的程序,算出100中7的倍数的最大值

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. java判断一个字符串中是否包含全角

    public static boolean isAngle(String str){ if(str.getBytes().length==str.length()){ //全是半角 return tr ...

  4. 环境变量,include搜索路径,lib库搜索路径

    环境变量 系统环境变量 我们知道,我们经常要设置一些环境变量,系统环境变量我们非常容易理解.其实我们在windows中经常容易接触.其实环境变量是一个非常广泛的一个概念,它与web应用程序中的web. ...

  5. Android 数据库 OrmLite Failed to open database

    04-01 16:49:32.720: E/SQLiteLog(1894): (14) cannot open file at line 30204 of [00bb9c9ce4]04-01 16:4 ...

  6. Ajax笔记(一)

    Ajax三步骤: Asynchronous Javascript And XML 1.运用HTML和CSS实现页面,表达信息: 2.运用XMLHttpRequest和web服务器进行数据的异步交换: ...

  7. GBK、GB2312和UTF-8编码区分

    GBK包含全部中文字符, GBK的文字编码是双字节来表示的,即不论中.英文字符均使用双字节来表示,只不过为区分中文,将其最高位都定成1. 至于UTF-8编码则是用以解决国际上字符的一种多字节编码,它对 ...

  8. ArcGIS10拓扑规则-面规则(转)

    ArcGIS10拓扑规则-面规则 原创 2013年12月27日 10:20:44 标签: ArcGIS 1879 ARCGIS 10 里提供的拓扑规则共32种,下面一一介绍: 首先介绍的对于面图层的拓 ...

  9. phper 需要学习js

  10. MyBatis01 MyBatis基础知识【搞清楚原理】

    1 MyBatis是什么 mybatis是一个持久层的框架,它对jdbc做了封装:是apache下的顶级项目 mybatis让程序将主要精力放在sql上,通过mybatis提供的映射方式,自由灵活生成 ...