源码之家

  • 首页
  • 文章
  • 问答
  • 下载
您的位置: 首页  >  文章  >  AttributeError: 'bytes' object has no attribute 'encode'

AttributeError: 'bytes' object has no attribute 'encode'

分类: 文章 • 2022-12-01 00:31:59

使用Django2.2的时候莫名其貌的就会出现很多错误,来一个解决一个!
解决方法:
找到python安装目录下的

E:\Python3.7\lib\site-packages\xlwt\BIFFRecords.py

AttributeError: 'bytes' object has no attribute 'encode'
大约在270行,将图中的encode去掉,变成下图:
AttributeError: 'bytes' object has no attribute 'encode'
然后重新调试django项目即可。

相关推荐

  • opencv-contrib-python安装步骤及module object has no attribute ‘xfeatures2d’问题
  • Flask回滚时出现AttributeError: 'NoneType' object has no attribute 'lower'
  • 解决TensorFlow中‘SGD‘ object has no attribute ‘apply_gradient’报错问题
  • Deepin下Python2.7安装Django出现'module' object has no attribute 'lru_cache'错误
  • python pandas模块遇到 ‘DatetimeProperties‘ object has no attribute ‘weekday_name‘
  • 纯小白问题……为啥pygal的Bar不好用?AttributeError: module 'pygal' has no attribute 'Bar'错误解决
  • python安装dlib遇到的错误:AttributeError:module ‘dlib’ has no attribute ‘get_frontal_face_detector’问题解决
  • Python的AttributeError: module 'base64' has no attribute 'b64decode'问题
  • python console 抛出AttributeError: 'PyDevTerminalInteractiveShell' object has no attribute 'has_readli
  • AttributeError: 'NoneType' object has no attribute 'lower'Flask 历史回退异常
  • SpringBoot搭建-02
  • 解决git merge冲突(英文版)
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 源码之家    备案号:   粤ICP备20058927号