Run py files report the error:
pytesseract.pytesseract.TesseractError: (1, ‘Error opening data file \\Program Files\\Tesseract-OCR\\tessdata/eng.traineddata’)
Specify tessdata_dir in the py file
testdata_dir_config = '--tessdata-dir "C:\\Program Files\\Tesseract-OCR\\tessdata"' textCode = pytesseract.image_to_string(img, config=testdata_dir_config)
Problem solving
This error is reported
Filenotfounderror: [winerror 2] the system cannot find the specified file
Modify the testseract in the pytestseract.py file_cmd
tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
Done!
Similar Posts:
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in you…
- [Python] MAC uses the picture recognition pytesseract method to report an error
- [Solved] No connection string named ‘TestEntities’ could be found in the application config file
- [Solved] Visual Studio Error: Creation of the virtual directory http://localhost:62498/ failed with the error: Filename: \\?C:…………………………
- Error reported in vscode after installing Git
- Solution to runtime error in Mindjet MindManager
- Eclipse:Failed to load the JNI shared library
- attributeError: ‘NoneType’ object has no attribute ‘shape’
- Solution to the problem of bash: gulp: command not found after installing gulp in Windows system
- [How to Solve] “%Error opening tftp://255.255.255.255/network config”