2017-10-20 27 views
0
> import image 
> import pytesseract as pya 
> 
> pya.tesseract_cmd = r'C:\Users\Euphz\Documents\Artworks\PSD\Speaking 
of Dogs\201710' 
> print(pya.image_to_string(image.open('doggieville.png'))) 

Traceback (most recent call last): File "C:\PythonProjects\pytesseract.py", line 2, in import pytesseract as pya File "C:\PythonProjects\pytesseract.py", line 5, in print(pya.image_to_string(image.open('doggieville.png'))) AttributeError: module 'pytesseract' has no attribute 'image_to_string'はAttributeError:モジュールのpytesseract 'には属性 'image_to_string' を持っていない

なぜそれが起こっている

???

答えて

0

これを試すことができますか?

import image 
import pytesseract as pya 

pya.tesseract_cmd = r'C:\Users\Euphz\Documents\Artworks\PSD\Speaking 
of Dogs\201710' 
print(pya.image_to_string(image.open('doggieville.png'))) 

インポートステートメントは、別々の行にする必要があります。

+0

ありがとうございました。私はそれを貼り付けたときにタイプミスでした。 – Phemia

+0

彼らは別々の線だったときには機能しませんでした。 – Phemia

関連する問題