Skip to content

Undefined method content #3

@Mahesh8

Description

@Mahesh8

In my ruby file,

require 'rubygems'
require 'ocr'

ocr = OCR.use :weocr
ocr.file = '/Users/maheshmesta/Desktop/office/10.jpeg'
ocr.format = :txt
ocr.outputencoding = "utf-8"
ocr.recognize

puts "ERROR: #{ocr.error}" if ocr.error?
puts "RESULT: #{ocr.text}" unless ocr.error?

Running this file throws ERROR: undefined method `content' for nil:NilClass

On my terminal ocr.recognize shows nil. What could be the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions