Using 3rd party tools like BOTO in Sikuli scripts dont work.

Asked by Nick Newell

Due to the limitations of loading libraries like JSON in Sikuli, one has to do some special imports like
{code}
import simplejson as json
{code}
to use JSON. However, for 3rd party tools like BOTO, which have their own dependancies, it seems the only solution is modifying their code to safely use libraries like JSON.

If you try to use BOTO directly in a Sikuli script you will get something like :
"
Traceback (most recent call last):
  ...
    from boto.s3.connection import S3Connection
  File "/Library/Python/2.7/site-packages/boto/s3/connection.py", line 29, in <module>
    import boto.utils
  File "/Library/Python/2.7/site-packages/boto/utils.py", line 78, in <module>
    import json
ImportError: No module named json
"

Is their a workaround for this?

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

Make sure, that a reference to the simplejson package is in sys.path BEFORE the BOTO stuff

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#2

> Is their a workaround for this?

There is different approach to Sikuli: not calling your functionality from Sikuli IDE but calling Sikuli functionality and all other stuff you need from your own Python/Jython script.

Did you try that, calling both that BOTO and Sikuli from non-Sikuli IDE Python/Jython code?

Can you help with this problem?

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

To post a message you must log in.