1--》IndentationError:expected an indented block

   》IndentationError: unindent does not match any outer indentation level

  》IndentationError: unexpected indent

  报错的地方需要缩进,在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。最好都用Tab,简单些,本来打算全部用四个空格的,结果写完了,一执行到处都报错

2--》(unicode error) 'utf-8' codec can't decode

  需要将保存文件的格式换成UTF-8,在notepad++打开test.py >> (菜单栏)格式(编码)>> 选择转为UTF-8格式(Convert to UTF-8)

3--》UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-61:

     

1 import sys
2 reload(sys)
3 sys.setdefaultencoding('utf-8')

 在使用 pytesseract中的image_to_string时报错如下:

Python错误集

在C:\Python27\Lib\site-packages\pytesseract下找到pytesseract.py,打开后,做如下修改

Python错误集

 

 

 

相关文章:

  • 2022-12-23
  • 2021-09-07
  • 2021-08-07
  • 2022-12-23
  • 2021-05-24
  • 2022-01-10
  • 2021-07-18
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2021-09-17
  • 2021-11-21
  • 2021-11-04
  • 2021-08-16
  • 2022-12-23
相关资源
相似解决方案