[BUG-11456] Error importing jython socket library

I uploaded a project that runs a script during startup. When my application started an error window was shown.
Upon further investigation, I found that the “fault” condition was the first statement in the script, an import to the socket library. The error is also shown if the library is imported from the Script Console.

This is a known issue that will be fixed by an update to Jython 2.7.1, which is on our roadmap.

1 Like

This issue was fixed in the build that was uploaded on 11/15. Please let us know if you continue to see this behavior after upgrading.

Still having a problem with this line of code
from socket import socket

That will not work.

AF_INET and SOCK_STREAM are part of the socket module, which you need to specify when creating the socket.

use import socket and you’ll be fine.