You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just got the same panic from client.go:58.
But it turns out the reason was I don't have tesseract in my PATH.
Maybe you should make gosseract to print an error if tesseract is not in PATH.
when i use the following code to ocr a jpeg format pic.
img_url := "http://cityjw.dlut.edu.cn:7001/ACTIONVALIDATERANDOMPICTURE.APPPROCESS"
resp, err := client.Get(img_url)
if err != nil {
// handle error
}
defer resp.Body.Close()
OcrClient, _ := gosseract.NewClient()
img, _ := jpeg.Decode(resp.Body)
out, _ := OcrClient.Image(img).Out()
fmt.Println(out)
and then i got some error.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x43926a]
goroutine 1 [running]:
runtime.panic(0x664a20, 0x965b48)
/usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/otiai10/gosseract.(*Client).Image(0x0, 0x7f008865e7a0, 0xc210059480, 0x0)
/home/halfcrazy/gocode/src/github.com/otiai10/gosseract/client.go:58 +0x13a
main.main()
/home/halfcrazy/gocode/src/school_helper/main.go:29 +0x204
The text was updated successfully, but these errors were encountered: