Jython: socket connecting only once, then Java Exception
Hello all,
I'm trying to have Sikulix exchange information with a server that have to take some actions before each test, I'm using the below code (well, similar, but this one shows exactly the same problem).
For testing reasons so far the server is on my pc.
At first attempt everything runs well and on the receiving side I see "hello world From SikuliX"
When I try to run again the same script without closing the IDE I have a Java Exception, see below since it is very long.
Closing the IDE and reopening it gives me another successful attempt
I'm not an expert of python, so this may be a stupid problem...in case forgive me....
Thank in advance for your help
This is the code on Sikulix (has some additional and unneeded popup for debug):
import socket
result = Do.popAsk(
if None == result:
print "nothing to do"
elif result:
msg="hello world From SikuliX\n"
data = bytearray( msg)
client_socket = socket.
client_
client_
client_
print "user said yes to\n" + msg
else:
print "user said no"
exit()
This is the output from Sikulix;
user said yes to
hello world From SikuliX
[info] Exit code: 0
And this is the exception I get at the second attempt:
ott 08, 2018 3:13:59 PM org.python.
WARNING: Force-closing a channel whose registration task was not accepted by an event loop: [id: 0xf7ef9343]
java.util.
at org.python.
.... more
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- matteoa
- Solved:
- Last query:
- Last reply: