← Back to team overview

sikuli-driver team mailing list archive

[Question #694382]: [2.0.4] Can not import python installed module (PIP packages) like Faker in Sikulix

 

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

Using manual I added the path to Python site-packages

- make a folder Lib/site-packages in your SikulixAppData folder
- add a file sites.txt into that folder
- in the file have a line containing the absolute path to your Python site-packages folder
- restart the IDE

But I have an error: 

[error] script [ 10000messages ] stopped with error in line 12
[error] TypeError ( find_module() takes exactly 3 arguments (2 given) )
[error] --- Traceback --- error source first
line: module ( function ) statement 
489: pkgutil (  find_loader ) TypeError: find_module() takes exactly 3 arguments (2 given)
594: pkgutil (  get_data )   File "C:\Users\druid\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\pkgutil.py", line 478, in get_loader
6: __init__ (  <module> )     _replaces = pkgutil.get_data(__name__, 'data.bin').decode('utf8').split('\x00')
37: __init__ (  import_module )   File "C:\Python27\lib\site-packages\faker\providers\internet\__init__.py", line 6, in <module>
45: loading (  find_available_locales )     provider_module = import_module(provider_path)
15: config (  <module> )     AVAILABLE_LOCALES = find_available_locales(PROVIDERS)
11: factory (  <module> )     from faker.config import AVAILABLE_LOCALES, DEFAULT_LOCALE, PROVIDERS
1: __init__ (  <module> )     from faker.factor
y import Factory  # noqa F401
12: main (  <module> )     from faker import Faker
[error] --- Traceback --- end --------------


Code:

from faker import Faker
faker = Faker()
...
paste(faker.text());
...

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