← Back to team overview

sikuli-driver team mailing list archive

[Question #667817]: Extract text from image and save txt file

 

New question #667817 on Sikuli:
https://answers.launchpad.net/sikuli/+question/667817

Please,
My code:

import os
import shutil
import unittest
import time
import sys
import HTMLTestRunner

click (image) # whit the name: fone.png

from uuid import uuid4
folder_name = str(uuid4())
os.makedirs(folder_name)
with open("c:/CEx3 - ImagemCartao\SKL3.sikuli/teste.txt".format(fn=folder_name),'wb') as f:
    f.write(image_to_string(img1))

But the Sikuli show-me the error: [error] Error caused by: Traceback (most recent call last): File "C:\CEx3 - ImagemCartao\SKL3.sikuli\SKL3.py", line 42, in <module> f.write(image_to_string(img1)) NameError: name 'image_to_string' is not defined 

The sikuli created the file : teste.txt but is clear!. 

Thank's for all

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.