0
from PIL import Image
import pytesseract
import cv2
import cv2
img= cv2.imread('D:/ss.png')
pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract- 
OCR\tesseract.exe'
tex = pytesseract.image_to_string(Image.open('D:/ss.png'),lang='eng')
print(pytesseract.image_to_string(Image.open('D:/ss.png'),lang='eng'))
cv2.namedWindow("input image")
cv2.imshow("Input image",img)
cv2.waitKey(0)
cv2.destroyWindow('Test')
cv2.destroyWindow('Main')

while execute it shows"EOF WHILE SCANNING STRING LITERAL"

What is the problem????

RAVI RK
  • 5
  • 3

1 Answers1

0

Probably issue:

pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract- 
OCR\tesseract.exe'

=>

pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract- 
OCR\tesseract.exe"
metamemelord
  • 500
  • 1
  • 7
  • 19