鱼C论坛

 找回密码
 立即注册
查看: 3569|回复: 8

python 识别验证码报错

[复制链接]
发表于 2016-3-2 16:39:59 | 显示全部楼层 |阅读模式
4鱼币
# -*- coding: utf-8 -*-

import pytesseract

import urllib
from PIL import Image
from PIL import ImageGrab
from PIL import Image,ImageDraw



addr = 'http://pic002.cnblogs.com/images/2012/116671/2012100216184444.jpg'

urllib.urlretrieve(addr,'temp1.tif')
im = Image.open('temp1.tif')
textcode =pytesseract.image_to_string(im)
print textcode


报错:
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\recognition.py", line 17, in <module>
    textcode =pytesseract.image_to_string(im)
  File "build\bdist.win-amd64\egg\pytesseract\pytesseract.py", line 167, in image_to_string
    raise TesseractError(status, errors)
TesseractError: (1, "'tesseract' \xb2\xbb\xca\xc7\xc4\xda\xb2\xbf\xbb\xf2\xcd\xe2\xb2\xbf\xc3\xfc\xc1\xee\xa3\xac\xd2\xb2\xb2\xbb\xca\xc7\xbf\xc9\xd4\xcb\xd0\xd0\xb5\xc4\xb3\xcc\xd0\xf2\r\n\xbb\xf2\xc5\xfa\xb4\xa6\xc0\xed\xce\xc4\xbc\xfe\xa1\xa3")

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-3-3 20:52:20 | 显示全部楼层
难道是格式不对?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-3-3 20:53:55 | 显示全部楼层
感觉你是函数调用的不对,缺少一步
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2016-3-9 12:53:33 | 显示全部楼层
jzh823 发表于 2016-3-3 20:53
感觉你是函数调用的不对,缺少一步

如何解决
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-3-22 15:09:59 | 显示全部楼层
没看懂= =
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-3-22 16:21:47 | 显示全部楼层
看不懂哦
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-12-26 18:18:30 | 显示全部楼层
围观学习
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2016-12-26 19:38:50 | 显示全部楼层
路过
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

头像被屏蔽
发表于 2016-12-26 21:52:10 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-2-19 22:02

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表