Pyinstaller打包过程中报错“AttributeError: 'str' object has no attribute 'items''”问题解决
继上一篇博客之后我在使用pyinstaller打包机器学习模型的时候一直报错AttributeError: 'str' object has no attribute 'items',如下图所示:
这让我很困惑,输出信息一大堆,但是就是定位不到具体的问题在哪,后来在上一行的报错信息中我发现是来自setuptools的,抱着死马当活马医的心态,这是一个内置模块不好去卸载它,我就直接更新了这个模块到最新的版本,命令如下:
python3 -m pip install -U setuptools
之后重新执行打包命令,居然OK了......
Pyinstaller打包过程中报错“AttributeError: 'str' object has no attribute 'items''”问题解决相关推荐
- 爬虫的自创建请求对象:报错AttributeError: 'str' object has no attribute 'items'
在使用爬虫库创建自定义请求对象时 将值传入headers agent = random.choice(userAgent) REQ = request.Request(url,headers=agen ...
- sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘
sklearn使用FeatureHasher处理字符串特征: AttributeError: 'str' object has no attribute 'items' 目录 sklearn使用Fea ...
- celery AttributeError: 'str' object has no attribute 'items'
AttributeError: 'str' object has no attribute 'items' python manage.py celery worker --loglevel=info ...
- python中使用ZADD方法报错AttributeError: 'int' object has no attribute 'items'
redis的版本关系 正确的完整实例如下: import pymongo import redis# 代码作用是mongodb的数据传送到redis中去 handler = pymongo.Mongo ...
- 爬虫出现AttributeError: ‘str‘ object has no attribute ‘items‘
问题其实很简单,意思是说str类型没有items属性,items属性是字典的属性. 此处是因为headers本应为dict,实际传入了str. 做如下修改:
- AttributeError: ‘str‘ object has no attribute ‘prefix_chars‘——类实例化不带括号的后果
最近学习yoloV3,看给出的代码使用argparse模块写命令行参数,觉得很好. 今天尝试自己用argparse模块写参数,如下代码所示: import argparseif __name__ == ...
- AttributeError: ‘str‘ object has no attribute ‘read‘
AttributeError: 'str' object has no attribute 'read' json解析时报错 json.load(filename) json.loads(string ...
- 已解决AttributeError: ‘str‘ object has no attribute ‘apply‘
已解决(pandas apply函数使用报错)AttributeError: 'str' object has no attribute 'apply' 文章目录 报错代码 报错翻译 报错原因 解决方 ...
- AttributeError: 'str' object has no attribute 'decode' django问题
AttributeError: 'str' object has no attribute 'decode' 错误代码:query = query.encode(errors='replace') 解 ...
- 成功解决keras库中出现AttributeError: ‘str‘ object has no attribute ‘decode‘
成功解决keras库中出现AttributeError: 'str' object has no attribute 'decode' 目录 解决问题 解决思路 解决方法 解决问题 Attribute ...
最新文章
- python【蓝桥杯vip练习题库】ADV-77统计平均成绩
- oracle SQL 命令行(一.基础)
- 水下机器人_相关知识点
- 包装类java_java中的包装类
- 亚马逊ECS和Kubernetes管理百万容器8个洞察
- php 删除数组的空元素,php删除数组空元素的方法_后端开发
- 找到一个或多个多重定义的符号_初中数学之相反数,总结规律,学会多重符号的化简...
- USACO-Section1.5 Arithmetic Progressions(枚举)
- Chromium Embedded Framework中文文档之(基本使用)
- mysql 命令行可以连接 php不能,mysql连接命令行可以php竟然不可以
- JSK-16013 价钱统计【基础】
- calendar类_不要再自己写 Java 工具类了,这些开源的不香吗?
- git 各种撤销操作办法
- linux 系统如何启动服务,如何查看和停止Linux启动的服务
- 记录使用Kettle导入excel数据心得
- doctrine2 mysql_Hello Doctrine2
- Arduino Pulsesensor脉搏心率的检测
- csgo如何保存自己的cfg_[CS:GO]如何导出cfg文件 最新方法[已解决]
- 企业知识管理的重要性
- 快租车app——需求分析心得