json import error
I want to import a module (written in python2.4) which is using json and simplejson into my own sikuli program.
I included therefore json_simple-1.1.jar and jyson-1.0.2.jar (from opensource.
When running Sikuli-IDE, I get the error message in that import file:
"File "modulexxx.py (=name of the import module)", line 94, in
from json import loads as json_decode, dumps as json_encode
ImportError: No module named json"
The code excerpt from the module I want to import:
-----
try:
from json import read as json_decode, write as json_encode
except ImportError:
try:
from json import loads as json_decode, dumps as json_encode
except ImportError:
from simplejson import loads as json_decode, dumps as json_encode <- this is line 94
----
Does anyone now how I get the import of the module work?
I am a sikuli and python beginner, so any help would be highly appreciated!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: