# \[BUG-11456\] Error importing jython socket library

**URL:** <https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601>\
**Category:** Ignition Early Access\
**Tags:** scripting\
**Created:** [November 6, 2018, 10:43pm UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601 "2018-11-06T22:43:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![everardohr](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@everardohr](https://forum.inductiveautomation.com/u/everardohr)\
**Post date:** [November 6, 2018, 10:43pm UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601/1 "2018-11-06T22:43:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 6, 2018, 10:44pm UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601/2 "2018-11-06T22:44:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [December 7, 2018, 12:27am UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601/3 "2018-12-07T00:27:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [April 16, 2019, 6:17pm UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601/4 "2019-04-16T18:17:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 16, 2019, 6:27pm UTC](https://forum.inductiveautomation.com/t/bug-11456-error-importing-jython-socket-library/20601/5 "2019-04-16T18:27:44Z")

</div>

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.
