xmlrpclib.fault:text search currently switched off

Asked by bikash

i started using sikuli 2days back so still new to few concepts.I wrote a program which when used without xmlrpc runs very well but starts giving me problem while triggering the sikuli script through Python using xmlrpc.I saw one solution by RaiMan to use Settings.OcrTextSearch = True.
i used that in my sikuli script but keep getting the same error message.
i appreciate any kind of help in this regard.

Thanks,
Bikash

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

could you be more specific about what you are doing with what.
especially Python and xmlrpc.

what version, what system?

what error message?

Revision history for this message
bikash (bikashranjandas) said :
#2

sorry my message was not clear.I am using Sikuli IDE 1.0.1 in Window 8.1.

I am trying to use an application in the remote desktop.When i use the sikuli IDE directly i get no error but invoking the sikuli script through Python using the xmlprc gives me error "xmlrpclib.fault:text search currently switched off".

First few lines of the script runs well which includes
1.opening the remote desktop connection.
2.typing my credentials
3.opening the remote desktop

After that the program fail to proceed any further.I am pasting a part of my code below-->

#automation of IFBox_Controller App from remote desktop
from SimpleXMLRPCServer import SimpleXMLRPCServer as Server
import logging
Settings.OcrTextSearch = True
Settings.OcrTextRead = True

def IF_Box_Controller():

    def unsupported_JTAGchain():
        click(Pattern("1429074524600.png").similar(0.80).targetOffset(113,60))
        click("1429072379377.png")

    def USB_communication_Failed():
        click(Pattern("1429074242736.png").similar(0.80).targetOffset(76,59))

        click(Pattern("1429072336745.png").targetOffset(-19,-19))
        click("1429072379377.png")
        wait(20)
        if exists(Pattern("1429074509520.png").similar(0.80)):
            unsupported_JTAGchain();
            wait(20)

        click(Pattern("1429072415289.png").targetOffset(17,-2))

        click(Pattern("1429072734520.png").similar(0.80).targetOffset(-67,-10))
        click(Pattern("1429072778168.png").targetOffset(-102,4))
        click(Pattern("1429072820696.png").similar(0.80).targetOffset(-44,3))

    #opening the remote desktop app
    remoteDesktop = ("mstsc.exe")
    App.focus(remoteDesktop)
    type('a', KeyModifier.CTRL)

    click(Pattern("1429064917627.png").targetOffset(79,87))

    paste("1429004003531.png", "password")
    click(Pattern("1429004042643.png").targetOffset(90,168))

    #Opens the remote desktop
    wait(5)

    #From this part onwards the script fails to run (i am clicking the remote desktop icon image at the top to bring its window to
       front but it fails)
    click("1429094975833.png")

    # Open IF Box Controller
    click("1429004154915.png")
    paste("1429004292186.png", "C:\\Users\\axel\\Desktop\\new IF Box controller\\IFBoxController_140206B.exe")
    type("\n")
    wait(3)

    click("1429004154915.png")
    paste("1429004292186.png", "C:\\Users\\axel\\Desktop\\tera_auto_log.bat")
    type("\n")
    wait(2)

#logging.basicConfig(level = logging.DEBUG)
srv = Server(("127.0.0.1",8000), logRequests = True)
if not srv:
    exit(1)
srv.register_function(IF_Box_Controller)
srv.serve_forever()

----------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------

ThankYou
Bikash

Revision history for this message
RaiMan (raimund-hocke) said :
#3

This is what I understand:

1 you have a SystemA, that has SikuliX 1.0.1 installed
2 on SystemA you can run RDP, that accesses some SystemB, where your target application runs
3 you have a server.sikuli with the above mentioned content and features
4 you start this server.sikuli somehow, which just does nothing, but starting the xml-rpc server and wait for client requests
5 now from somewhere (seems to be some Python code), you issue some xml-rcp client request, that triggers the execution of the IF_Box_Controller() function.

at 4: how do you do that?

Now you say, that the IF_Box_Controller() function partly works (I guess you see the connection setup and the RDP window), which means, the image files are found in the folder server.sikuli, but suddenly this is no longer true for
click("1429094975833.png") # bring RDP window to front

since a message like
:text search currently switched off

tells us, that "1429094975833.png" cannot be used as image filename (not found in the filesystem or not useable).
In this case the given text is used for text search, but text search does not work in your situation (which would indeed did not make any sense, even if it worked).

conclusion:
If I understood right, then I simply have no idea about possible causes.

what can you do:
- run the server.sikuli with -d 3 or at the beginning of the script say
Debug.setDebugLevel=3

- you might test with version 1.1.0
switching debug on here in the script:
Debug.on(3)

Revision history for this message
bikash (bikashranjandas) said :
#4

Thanks RaiMan for your reply,i will post my results after fixing the problem.Thanks for your effort.I will check with your method first.

Bikash

Can you help with this problem?

Provide an answer of your own, or ask bikash for more information if necessary.

To post a message you must log in.