[Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
New question #660655 on Sikuli:
https://answers.launchpad.net/sikuli/+question/660655

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 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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread RaiMan
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Status: Open => Answered

RaiMan proposed the following answer:
You use non-Sikulix Features. Better ask on stackoverflow.com
Same Jython on both systems?
Use latest SikuliX.

-- 
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Max posted a new comment:
The same code on sikulix  linux is working fine.
In both OS I have the latest sikulix.

-- 
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-12 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Max posted a new comment:
I think is a sikuli issue since, if I run a python script with these lines, the 
code is working properly (on windows).
>From the error logs I had the impression that sikuli tried to use its own 
>_socket.py

-- 
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-15 Thread TestMechanic
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

TestMechanic posted a new comment:
Some thoughts on the topic
Are you running the code from IDE? Try from console
Note that lang spec for jython in Sikuli is older than recent pythons 
You can always import other socked.py that is working on Windows

-- 
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-21 Thread Max
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Status: Answered => Open

Max is still having a problem:
Yep, I'm running the code from IDE.  In stackoverflow someone suggested
to use run() function in sikuli and call an external python script . Any
idea how to use 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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-11-29 Thread RaiMan
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Status: Open => Needs information

RaiMan requested more information:
solved?

-- 
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


Re: [Sikuli-driver] [Question #660655]: .sendto() method does not work on windows

2017-12-15 Thread Launchpad Janitor
Question #660655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/660655

Status: Needs information => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Needs information'
state without activity for the last 15 days.

-- 
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