'module' object has no attribute 'RTLD_GLOBAL'

Asked by Joel

I was using Sikuli to create a test script that utilized DDS to provide stimulus to the user interface. The python code (runs standalone) uses a connector that uses ctypes. When running within IDE I get the error below:

2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
[error] script [ shapes ] stopped with error in line 5
[error] AttributeError ( 'module' object has no attribute 'RTLD_GLOBAL' )
[error] --- Traceback --- error source first
line: module ( function ) statement
55: rticonnextdds_connector ( <module> ) rti = ctypes.CDLL(os.path.join(path, libname), ctypes.RTLD_GLOBAL)

Is this a result of the jython version Sikuli is using? Is there a way to update it?

Thanks for any direction you can provide.

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

Python modules, that use C-based stuff inside, cannot be used with Jython, which is Java based.
Only Python modules, written in pure Python can hence be used with SikuliX.

You might try a solution, that runs your Python stuff in a subprocess with Python interpreter and somehow communicates with your main script running with Jython (or other way round if this is more suitable).

Can you help with this problem?

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

To post a message you must log in.