使用ocr python selenium不显示图像中的任何文本,但不显示脚本中的错误

使用ocr python selenium不显示图像中的任何文本,但不显示脚本中的错误,python,selenium,Python,Selenium,这是我的代码,当我运行它时,它执行得很好,但它没有显示文本,正如您在下面的图像文件中看到的那样 这是我从中提取文本的图像 from PIL import Image import pytesseract as pytesseract pytesseract.pytesseract.tesseract_cmd = r'C:\Users\tipo\tesseract\Tesseract-OCR\tesseract.exe' image_path = r"C:\Users\tipo\D

这是我的代码,当我运行它时,它执行得很好,但它没有显示文本,正如您在下面的图像文件中看到的那样

这是我从中提取文本的图像

from PIL import Image
import pytesseract as pytesseract
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\tipo\tesseract\Tesseract-OCR\tesseract.exe'

image_path = r"C:\Users\tipo\Desktop\jag"

# Opening the image & storing it in an image object
img = Image.open("C:/Users/tipo/Desktop/jag/image.png")



# Passing the image object to image_to_string() function
# This function will extract the text from the image
text = pytesseract.image_to_string(img)

# Displaying the extracted text
print(text)