pyinstaller打包的时候,报错如下:

File "D:\Python34\lib\site-packages\PyInstaller\hooks\hook-zmq.py", line 18, in <module>
hiddenimports.extend(collect_submodules('zmq.backend'))
File "D:\Python34\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 619, in collect_submodules
repr(pkg_dir), package))
File "D:\Python34\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 90, in exec_statement
return __exec_python_cmd(cmd)
File "D:\Python34\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 77, in __exec_python_cmd
txt = exec_python(*cmd, env=pp_env)
File "D:\Python34\lib\site-packages\PyInstaller\compat.py", line 549, in exec_python
return exec_command(*cmdargs, **kwargs)
File "D:\Python34\lib\site-packages\PyInstaller\compat.py", line 356, in exec_command
out = out.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 110: invalid continuation byte

这个错误,后来通过Google之后,解决方案如下:

https://stackoverflow.com/questions/47692960/error-when-using-pyinstaller-unicodedecodeerror-utf-8-codec-cant-decode-byt

其实就是:

修改D:\Python34\Lib\site-packages\PyInstaller\compat.py文件中

1
out = out.decode(encoding)

为:

1
out = out.decode(encoding, errors='ignore')

然后再次运行脚本就不会报错了。

【已解决】pyinstaller UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 110: invalid continuation byte的更多相关文章

  1. 【已解决2】pyinstaller UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 110: invalid continuation byte

    python打包exe解码错误问题       最近做了一个小项目,其中把自己写的python打包成exe文件.我用的是pyinstaller. 只需要打包主程序py文件就ok. 在打包过程中,遇到一 ...

  2. UnicodeDecodeError: 'utf8' codec can't decode byte 0xce in position 47: invalid continuation byte

  3. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 52: invalid continuation byte

    代码: df_w = pd.read_table( r'C:\Users\lab\Desktop\web_list_n.txt', sep=',', header=None) 当我用pandas的re ...

  4. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 22: invalid continuation byte

    在使用python读取文本文件,一般会这样写: # -*- coding:utf-8 -*- f = open("train.txt", "r", encodi ...

  5. 解决linux 终端UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte

    vi   /etc/locale.conf 修改LANG="zh_CN.gbk" 最后执行source /etc/locale.conf 即可永久生效,下次登录,中文就不会乱码了.

  6. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 99: invalid continuation byte

    Traceback (most recent call last): File "/Users/c2apple/PycharmProjects/easyToPython/fileMethod ...

  7. 【安装Python环境】之安装Selenium2时报UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 12: invalid continuation byte问题

    问题描述: windows8.1系统,Python3环境安装Selenium2时报错,错误如下: ..... ..... File "F:\软件\python3.6.1\lib\site-p ...

  8. python3 报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 201: invalid continuation byte

    代码: # -*- coding:utf-8 -*- from urllib import request resp = request.urlopen('http://www.xxx.com') p ...

  9. Python:出现UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 0: invalid continuation byte问题

    我在导入一个csv文件的时候出现了一个问题 报错的内容是这样的: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in positio ...

随机推荐

  1. laravel5.5的服务容器分析

    简介 服务容器是Laravel的核心.见名知意,服务容器就是一个存放服务的地方,当我们需要某个服务的时候,我们就可以从这个容器中取出我们需要的服务.用更专业一点的术语来说,官网定义服务容器是这样的: ...

  2. Spring框架学习笔记(8)——spring boot+mybatis plus+mysql项目环境搭建

    之前写的那篇Spring框架学习笔记(5)--Spring Boot创建与使用,发现有多小细节没有提及,,正好现在又学习了mybatis plus这款框架,打算重新整理一遍,并将细节说清楚 1.通过I ...

  3. FTP服务后门利用

    开门见山 1. 扫描同网段的靶场机,发现PCS,192.168.31.137 2. 扫描靶场机服务信息和服务版本 3. 快速扫描靶场机全部信息 4. 发现开放ftp服务,并扫描此ftp软件版本是否存在 ...

  4. vscode打开文件,中文显示乱码(已解决)

    之前使用vscode打开keil的文件后,发现显示乱码,网上查找资料发现大多是这种方法:将files.autoGuessEncoding改为true,但是并没有用. 发现第二种方法为:在vscode中 ...

  5. Shell考题初级篇

    将当前目录下大于10K的文件转移到/tmp目录下 find . -type f -size +10k -exec mv {} /tmp \; 编写一个shell,判断用户输入的文件是否是一个字符设备文 ...

  6. Windows环境安装与配置RocketMQ

    1.下载RocketMQ http://rocketmq.apache.org/release_notes/release-notes-4.3.0/ 2.解压下载的安装包rocketmq-all-4. ...

  7. 转载: Java虚拟机:运行时内存数据区域、对象内存分配与访问

    转载:  https://blog.csdn.net/a745233700/article/details/80291694  (虽然大部分内容都其实是深入理解jvm虚拟机这本书里的,不过整理的很牛逼 ...

  8. ubuntu-14.04.6配置IP

    配置环境与要求: 网卡列表如下: eth0:DHCP模式 eth1:静态模式 网络概况与要求: 192.168.2.0/24为外网(获取网络资源) 10.5.1.0/24为内网(终端服务管理) 系统默 ...

  9. Unreal Engine 4 蓝图完全学习教程(四)—— 变量与计算

    Ⅰ.值的基础类型 ①文本.字符串(Text.String):文本类型的值. ②整型.浮点型(Int.Float):数字类型的值. ③布尔型(Bool):表示“真或假”二者选其一的状态. Ⅱ.加法运算 ...

  10. ## springboot 下策略模式的简单使用

    1.灵魂三问 接手前人(已跑路)项目快乐否? 前人项目不写注释懵逼否? 一个方法中一堆if/else,且业务判断条件用简单数字(或英文字母),不带注释,想打人否?     所以,对于上述三个问题,我写 ...