log.Print dose not print anything after runing client.Text()
sunshineplan opened this issue · 0 comments
sunshineplan commented
Summary
log.Print dose not print anything after runing client.Text()
Reproducibility
Reproducibility Frequency
- 100%
install MSYS2 and update the package database and base packages
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
pacman -S mingw-w64-x86_64-tesseract-ocr
pacman -S mingw-w64-x86_64-tesseract-data-eng
set TESSDATA_PREFIX=xxxx
go run .
package main
import (
"fmt"
"log"
"github.com/otiai10/gosseract/v2"
)
func main() {
client := gosseract.NewClient()
defer client.Close()
log.Print(1)
err := client.SetImage("001-helloworld.png")
if err != nil {
log.Fatal(err)
}
log.Print(2)
text, err := client.Text()
if err != nil {
log.Fatal(err)
}
log.Println(3, text)
fmt.Println(4, text)
log.Println(5, text)
}
2022/01/13 18:27:50 1
2022/01/13 18:27:50 2
4 Hello, World!
Environment
Windows 10 64bit
go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Username\AppData\Local\go-build
set GOENV=C:\Users\Username\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Username\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Username\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.6
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Username\Desktop\test\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Username\AppData\Local\Temp\go-build297310557=/tmp/go-build -gno-record-gcc-switches
go version
go version go1.17.6 windows/amd64
tesseract --version
tesseract 4.1.1
leptonica-1.81.1
libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.0.6) : libpng 1.6.37 : libtiff 4.3.0 : zlib 1.2.11 : libwebp 1.2.1 : libopenjp2 2.4.0
Found AVX2
Found AVX
Found FMA
Found SSE
Found libarchive 3.5.2 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.3 libzstd/1.5.0