导致原因和python多数奇奇怪怪的问题一样,依赖包的版本问题。

解决办法:

对setuptools这个包进行升级,链接在这里 https://pypi.org/project/setuptools/

直接下载最新版就行了,不知道直接pip install setuptools好不好使,反正我没有用
https://github.com/pyinstaller/pyinstaller/issues/3507 即github的讨论区部分有很多对于出现问题求解的方法

pyinstaller打包报错:AttributeError: 'str' object has no attribute 'items'的更多相关文章

  1. Django2.2报错 AttributeError: 'str' object has no attribute 'decode'

    准备将 Django 连接到 MySQL,在命令行输入命令 python manage.py makemigrations 后报错: AttributeError: 'str' object has ...

  2. python报错“AttributeError: 'set' object has no attribute 'items'“

    作为才开始学爬虫的萌新,遇到了一个这样的错,很懵逼 后面到网络到处查看大佬的解决方法,才发现headers的请求头部信息有错误,headers是一个字典,不是字符串,所以报错了 原代码 headers ...

  3. Python PyInstaller 打包报错:AttributeError: 'str' object has no attribute 'items'

    pyinstaller打包时报错:AttributeError: 'str' object has no attribute 'items' 网上查询,可能是setuptools比较老: 更新一下 p ...

  4. py+selenium 明明定位不到元素,但却不报错或是报错AttributeError: 'list' object has no attribute 'click'【已解决】

    问题:定位不到元素,但却不报错或者出现报错AttributeError: 'list' object has no attribute 'click' 如图  或者  解决方法:   将”driver ...

  5. dnspython模块报错 AttributeError: 'CNAME' object has no attribute 'address'

    有时候用到这个模块的时候会报错 AttributeError: 'CNAME' object has no attribute 'address' 如下所示 [root@ansible ch01]# ...

  6. 关于flask登录视图报错AttributeError: '_AppCtxGlobals' object has no attribute 'user'

    在一个小程序中写了一个登录视图函数,代码如下: @app.route('/login',methods = ['GET','POST']) @oid.loginhandler def login(): ...

  7. python文件名不要跟模块名相同,报错AttributeError: 'module' object has no attribute 'Differ'

    python中的文件都会生成pyc文件,包括模块也是这样,所以调用模块的时候,实际上会调用模块.pyc文件:在这个前提下,如果将文件名命名成跟模块名一样,在同一目录下就会生成一个跟模块名一样的pyc文 ...

  8. 机器学习实战:KNN代码报错“AttributeError: 'dict' object has no attribute 'iteritems'”

    报错代码: sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True) 解决 ...

  9. 运行pytest,报错"AttributeError: 'module' object has no attribute 'xxx'"

    最近学习pytest被此问题困扰,敲脑壳,实在是不该.百度解决方法一大堆,我的问题怎么也解决不了,来看一下,我是怎么解决的,各位大佬勿喷,只是自己做笔记用,谢谢. 报错信息如下: 网上解决方法是这样的 ...

随机推荐

  1. elasticsearch 安装ik中文分词

    https://blog.csdn.net/c5113620/article/details/79339541

  2. jquery控制Request Payload和Form Data

    Request Payload方式,会发起两次请求 Form Data只发起一次请求 若要把一个ajax请求改为Payload方式,设置contentType即可,发现请求参数不是对象,再把参数转换为 ...

  3. pycharm里html注释是{# #}而不是<!-- -->?

    修改方式:如图修改成值None以后,command+/快捷键,html注释的符号就是<!-- 注释内容 -->:为Jinja2的时候,注释符号就是{# 注释内容 #} 修改成None时,H ...

  4. 编程精粹--编写高质量C语言代码(3):自己设计并使用断言(二)

    接着上一遍文章<<编程精粹--编写高质量C语言代码(2):自己设计并使用断言(一)>>,继续学习怎样自己设计并使用断言,来更加easy,更加不费力地自己主动寻找出程序中的错误. ...

  5. Mysql数据库再度使用

    查看数据库端口: show global variables like 'port'; 谨记:每一条sql结束的语句后都要接上分号. 在连接数据库时遇到过这种问题: Fatal error: Call ...

  6. $.extent()的理解

    $.extend()主要是用来扩展插件的,所谓的插件就是封装好的函数或者方法,可以直接调用. $.extend()与$.fn.extend()(或者写成$.prototype.extend()或者jq ...

  7. 工作总结 EF GroupBy() Select() Select() 中 Count() 分组 求总

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  8. WPF自学入门(十一)WPF MVVM模式Command命令 WPF自学入门(十)WPF MVVM简单介绍

    WPF自学入门(十一)WPF MVVM模式Command命令   在WPF自学入门(十)WPF MVVM简单介绍中的示例似乎运行起来没有什么问题,也可以进行更新.但是这并不是我们使用MVVM的正确方式 ...

  9. sublime text3编辑器经常使用快捷方式

    1.简单语法的自己主动补全 preferences->setting user 输入例如以下代码,保存. { "auto_complete":true, "auto ...

  10. Linux下Gcc 的编译过程

    在linux下开发难免会用到gcc编译.GCC(GNU Compiler Collection.GNU编译器套装),是由 GNU 开发的编程语言编译器.它是GNU编译器套装以GPL许可证所发行的自由软 ...