Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
383 views
in Technique[技术] by (71.8m points)

python - How is it possible that my anaconda bugs out after running pytesseract?

I'm bumping into this error while my code is running the pytesseract works fine however I am not able to print out my value and it seems my anaconda is bugging out or something. I am able to get that txt is a string which is set to 1:20 as seen here :

enter image description here

enter image description here

Here's the python code I am trying to run :

from PIL import Image
import pytesseract
pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files/Tesseract-OCR/tesseract.exe'
tessdata_dir_config = '--tessdata-dir "C:/Program Files/Tesseract-OCR/tessdata"'
im = Image.open('Untitled.png')
txt = pytesseract.image_to_string(im, config=tessdata_dir_config)
print(txt)

However If I want to interact with this value (like printing it) it seems anaconda buggs out. It performs the code but does not print the value :

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...