# ImportError: No module named abc

**URL:** <https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150>\
**Category:** Ignition\
**Created:** [February 27, 2018, 8:57am UTC](https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150 "2018-02-27T08:57:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liau.kwongweng](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@liau.kwongweng](https://forum.inductiveautomation.com/u/liau.kwongweng)\
**Post date:** [February 27, 2018, 8:57am UTC](https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150/1 "2018-02-27T08:57:32Z")

</div>

Greetings

I created a library function and hope to reuse it  
But then i got this error. I search through and read through the forum posts and tried but still could not resolve it.

Finally i just copy an existing file decimal.py and rename it as abc.py and try to import it but it still gives the same error as “ImportError: No module named abc”  
However, there wasnt any error for the line comprising of the import decimal. Both files are located in the same folder in pylib  
So could someone please kindly point out what am i missing here or where could the problem be?  
Would appreciate any kind advise.  
Thank you very much  
best regards  
kwong weng  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4a2d27e693263ade53beeaceab823ad9c87b2bc9.png)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4e1b20645459b16605aff66f2bd1e73abac9a935.png)

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [February 27, 2018, 9:51am UTC](https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150/2 "2018-02-27T09:51:48Z")

</div>

Can you try a regular `import abc`? I’ve had issues before when using the `from abc import *`syntax in Ignition. Ignition doesn’t seem to automatically reload those.

So it’s best to always use a plain `import abc` and then use `abc` in your function calls.

---

<div class="post-metadata">

**Author:** ![liau.kwongweng](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@liau.kwongweng](https://forum.inductiveautomation.com/u/liau.kwongweng)\
**Post date:** [February 28, 2018, 12:48am UTC](https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150/3 "2018-02-28T00:48:34Z")

</div>

Thanks for your kind reply  
Actually , prior to posting this post in the forum, i had already tried the normal “import abc” but it still gives the same error. Really cannot understand why the existing file “decimal.py” doesnt give an error but when simply duplicating the same file and rename it as abc, it gives an error?

Here is a detail of the error  
Traceback (most recent call last):  
File “event:actionPerformed”, line 4, in   
ImportError: No module named abc

```
at org.python.core.Py.ImportError(Py.java:304)
at org.python.core.imp.import_first(imp.java:755)
at org.python.core.imp.import_module_level(imp.java:837)
at org.python.core.imp.importName(imp.java:917)
at org.python.core.ImportFunction. __call__ ( __builtin__.java:1220)
at org.python.core.PyObject. __call__ (PyObject.java:357)
at org.python.core. __builtin__. __import__ ( __builtin__.java:1173)
at org.python.core.imp.importOne(imp.java:936)
at org.python.pycode._pyx915.f$0(<event:actionPerformed>:67)
at org.python.pycode._pyx915.call_function(<event:actionPerformed>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:647)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:183)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:284)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
at com.sun.proxy.$Proxy29.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

```

Ignition v7.9.1 (b2017012511)  
Java: Oracle Corporation 1.8.0\_111

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6a67da9234d3cdf470ec5164e28d86018c347732.png)

Would greatly appreciate any kind advise or help in this peculiar issue.  
Thank you very much

---

<div class="post-metadata">

**Author:** ![liau.kwongweng](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@liau.kwongweng](https://forum.inductiveautomation.com/u/liau.kwongweng)\
**Post date:** [February 28, 2018, 2:25am UTC](https://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150/4 "2018-02-28T02:25:20Z")

</div>

Thanks  
It seems that the error is due to the path  
Initially the files are put in the following path  
“C:\Program Files\Inductive Automation\Ignition\user-lib\pylib”  
But seems like it is not correct

So when the files are put inside this path/folder  
“C:\Users\stmuser.ignition\cache\gw192.168.1.2\_8088\_443\_main\C0\pylib”

It is working

Thank you
