problem with import .py
Hi I'm using
Linux debian jessie
sikulix 1.1.0 or 1.1.1(I installed it but when I run 'java -jar sikulix.jar', SikulixIDE 1.1.0 is open)
jython 2.7.0
When I use Sikuli X 1.0, I can run sikuli in command line by 'sikuli-ide -r xxx.sikuli' with other python file like 'send_email.py' which sends email by just put this 'import send_email' in my xxx.sikuli directory.
Now, I need to use sikulix 1.1.0 to use jython 2.7.0 properly(I need to make a post request to an api to upload a file) in my Linux machine. I can run the script with the Sikulix 1.1.0 IDE, but I got error message
'[error] ImportError ( No module named formdata )'
formdata is from http://
and this is my code
=======
import urllib2
import formdata
client_id = "1234"
url = 'http://
file = '/home/txt.txt'
fields = {'name': 'BOB SMITH'}
files = {'file': {'filename': file, 'content': 'Data here'}}
data, headers = formdata.
request = urllib2.Request('http://
f = urllib2.
print f.read()
=======
This is the command that I run in the command line
java -jar sikulix.jar -i -r ../sikuli/
[info] runcmd: lsb_release -i -r -s
[error] script [ /home/sikuli/
[error] ImportError ( No module named formdata )
I put the formdata.py in the test.sikuli which is same directory as test.py.
I wonder why it is not work in command line with Sikulix 1.1.0 because it works in Sikulix 1.1.0 IDE and previous version.
Do I need to get 1.1.1 ?
I got 1.1.1 from http://
Thank you for your help in advance.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask harry for more information if necessary.