Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Description changed to:
Hi,

I developed a sikuli python script on linux that uses this code:

from socket import AF_INET, SOCK_DGRAM
import sys
import socket
import struct, time

host = "pool.ntp.org"
port = 123
buf = 1024
address = (host,port)
msg = '\x1b' + 47 * '\0'

# reference time (in seconds since 1900-01-01 00:00:00)
TIME1970 = 2208988800L # 1970-01-01 00:00:00

# connect to server
client = socket.socket( AF_INET, SOCK_DGRAM)
client.sendto(msg, address)
msg, address = client.recvfrom( buf )

t = struct.unpack( "!12I", msg )[10]
t -= TIME1970

current_time = time.ctime(t).replace("  "," ")


The code is working fine under linux, but if I use sikulix on windows it 
crashes (at line =>  client.sendto(msg, address)  ) with the following error:

[error] script [ Sikuli_Test_Original ] stopped with error in line 23
[error] _socket.error ( [Errno -1] Unmapped exception: 
java.util.concurrent.RejectedExecutionException: event executor terminated )
[error] --- Traceback --- error source first line: module ( function ) 
statement 359: _socket ( handle_exception ) _socket.error: [Errno -1] Unmapped 
exception: java.util.concurrent.RejectedExecutionException: event executor 
terminated
995: _socket ( sendto ) File 
"C:\Users\myuser\Documents\Sikuli\sikulix.jar\Lib\_socket.py", line 971, in 
_datagram_connect
[error] --- Traceback --- end --------------


Any idea why and how to fix it?

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to