继上一篇博客之后我在使用pyinstaller打包机器学习模型的时候一直报错AttributeError: 'str' object has no attribute 'items',如下图所示:

这让我很困惑,输出信息一大堆,但是就是定位不到具体的问题在哪,后来在上一行的报错信息中我发现是来自setuptools的,抱着死马当活马医的心态,这是一个内置模块不好去卸载它,我就直接更新了这个模块到最新的版本,命令如下:

python3 -m pip install -U setuptools

之后重新执行打包命令,居然OK了......

Pyinstaller打包过程中报错“AttributeError: 'str' object has no attribute 'items''”问题解决相关推荐

  1. 爬虫的自创建请求对象:报错AttributeError: 'str' object has no attribute 'items'

    在使用爬虫库创建自定义请求对象时 将值传入headers agent = random.choice(userAgent) REQ = request.Request(url,headers=agen ...

  2. sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘

    sklearn使用FeatureHasher处理字符串特征: AttributeError: 'str' object has no attribute 'items' 目录 sklearn使用Fea ...

  3. celery AttributeError: 'str' object has no attribute 'items'

    AttributeError: 'str' object has no attribute 'items' python manage.py celery worker --loglevel=info ...

  4. python中使用ZADD方法报错AttributeError: 'int' object has no attribute 'items'

    redis的版本关系 正确的完整实例如下: import pymongo import redis# 代码作用是mongodb的数据传送到redis中去 handler = pymongo.Mongo ...

  5. 爬虫出现AttributeError: ‘str‘ object has no attribute ‘items‘

    问题其实很简单,意思是说str类型没有items属性,items属性是字典的属性. 此处是因为headers本应为dict,实际传入了str. 做如下修改:

  6. AttributeError: ‘str‘ object has no attribute ‘prefix_chars‘——类实例化不带括号的后果

    最近学习yoloV3,看给出的代码使用argparse模块写命令行参数,觉得很好. 今天尝试自己用argparse模块写参数,如下代码所示: import argparseif __name__ == ...

  7. AttributeError: ‘str‘ object has no attribute ‘read‘

    AttributeError: 'str' object has no attribute 'read' json解析时报错 json.load(filename) json.loads(string ...

  8. 已解决AttributeError: ‘str‘ object has no attribute ‘apply‘

    已解决(pandas apply函数使用报错)AttributeError: 'str' object has no attribute 'apply' 文章目录 报错代码 报错翻译 报错原因 解决方 ...

  9. AttributeError: 'str' object has no attribute 'decode' django问题

    AttributeError: 'str' object has no attribute 'decode' 错误代码:query = query.encode(errors='replace') 解 ...

  10. 成功解决keras库中出现AttributeError: ‘str‘ object has no attribute ‘decode‘

    成功解决keras库中出现AttributeError: 'str' object has no attribute 'decode' 目录 解决问题 解决思路 解决方法 解决问题 Attribute ...

最新文章

  1. python【蓝桥杯vip练习题库】ADV-77统计平均成绩
  2. oracle SQL 命令行(一.基础)
  3. 水下机器人_相关知识点
  4. 包装类java_java中的包装类
  5. 亚马逊ECS和Kubernetes管理百万容器8个洞察
  6. php 删除数组的空元素,php删除数组空元素的方法_后端开发
  7. 找到一个或多个多重定义的符号_初中数学之相反数,总结规律,学会多重符号的化简...
  8. USACO-Section1.5 Arithmetic Progressions(枚举)
  9. Chromium Embedded Framework中文文档之(基本使用)
  10. mysql 命令行可以连接 php不能,mysql连接命令行可以php竟然不可以
  11. JSK-16013 价钱统计【基础】
  12. calendar类_不要再自己写 Java 工具类了,这些开源的不香吗?
  13. git 各种撤销操作办法
  14. linux 系统如何启动服务,如何查看和停止Linux启动的服务
  15. 记录使用Kettle导入excel数据心得
  16. doctrine2 mysql_Hello Doctrine2
  17. Arduino Pulsesensor脉搏心率的检测
  18. csgo如何保存自己的cfg_[CS:GO]如何导出cfg文件 最新方法[已解决]
  19. 企业知识管理的重要性
  20. 快租车app——需求分析心得

热门文章

  1. GraphQL到底怎么用?看看这个例子就知道了
  2. 快速部署MySQL5.6.36数据库实践
  3. 网络风险成为中国企业新挑战
  4. 使用POI导出Excel公用类方法 v1.1
  5. eclipse经常出现弹窗Refreshing workspace
  6. pytest(2) pytest与unittest的区别
  7. CF1093D Beautiful Graph
  8. [HAOI2010]计数(组合数学)(数位DP)
  9. kbmmw 的HTTPSmartService中的跨域访问
  10. Eclipse 修改项目名称