これは初めてpytesseractを使用しています。私は小さな画像で簡単なOCRを実行しようとしています。これはOSErrorのをスローpytesseractがWinError 6を投げているのはなぜですか?
from PIL import Image
from pytesseract import image_to_string
test = Image.open(r'C:\test.jpg')
print(image_to_string(test))
:コードはつまるところ[WinError 6]ハンドルは
Traceback (most recent call last):
File "C:\Testing.py", line 5, in <module>
print(image_to_string(test))
File "C:\\pytesseract.py", line 161, in image_to_string
config=config)
File "C:\\pytesseract.py", line 94, in run_tesseract
stderr=subprocess.PIPE)
File "C:\\subprocess.py", line 911, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\\subprocess.py", line 1150, in _get_handles
c2pwrite = self._make_inheritable(c2pwrite)
File "C:\\subprocess.py", line 1182, in _make_inheritable
_winapi.DUPLICATE_SAME_ACCESS)
OSError: [WinError 6] The handle is invalid
無効である私は、Windows 7上で事前に
おかげでPythonの3.5を使用していますあなたの時間!
それが直接私がコメントする権利を持っていない「答え」質問 –
を助けていないので、これはコメントに、より適しているだろう。将来があれば気をつけます..ありがとう。 – Abdul