zoukankan      html  css  js  c++  java
  • python-UnicodeDecodeError: 'gbk' codec can't decode byte 0xa8 in position 157: illegal multibyte sequence

    • UnicodeDecodeError: 'gbk' codec can't decode byte 0xa8 in position 157: illegal multibyte sequence永久解决方法
    • 打开PyQuery文件导入     import chardet      模块将217行代码改为
    • 1  if 'filename' in kwargs:
      2                 txt = open('./test_01.html', 'rb').read()#./test_01.html运行文件
      3                 encoding = chardet.detect(txt)['encoding']
      4                 html = open(kwargs['filename'],encoding=encoding)
  • 相关阅读:
    常见问题
    查询
    多对多关系
    prototype & __proto__
    new operator
    用户
    express.Router
    Express 应用生成器
    LeanCloud
    npm常用命令
  • 原文地址:https://www.cnblogs.com/cheng10/p/13817835.html
Copyright © 2011-2022 走看看