# Object has no attribute 'openFile'

**URL:** <https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [July 25, 2018, 8:52am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965 "2018-07-25T08:52:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 25, 2018, 8:52am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/1 "2018-07-25T08:52:25Z")

</div>

I am trying to run the system.file.openFile function and i get the error: "object has no attribute ‘openFile’ ".  
Do I need to install a module to call this function.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 25, 2018, 10:27am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/2 "2018-07-25T10:27:24Z")

</div>

Without seeing the code, my first thought is in spelling or capitalization.

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 25, 2018, 10:34am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/3 "2018-07-25T10:34:47Z")

</div>

It won’t even show up on ‘Ctrl + Space’ see below.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/52b9ddabe9520ad25b264383b5f68b0d7ecb6e20.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 25, 2018, 12:16pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/4 "2018-07-25T12:16:53Z")

</div>

Are you trying to run this in the gateway scope?

It’s only available in the client because it opens a UI for the user to choose a file.

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 25, 2018, 3:47pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/5 "2018-07-25T15:47:21Z")

</div>

It is in the shared folder.  
I have run it from my shared folder successfully on my localhost to test i  
When I try run on a designer connected to a different machine’s gateway it does not work.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 25, 2018, 3:58pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/6 "2018-07-25T15:58:38Z")

</div>

Where are you writing/executing this script?

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 26, 2018, 8:20am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/7 "2018-07-26T08:20:42Z")

</div>

I’m calling it from the script console.  
Even when I try call it from the project folder, the function doesn’t show up.

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 26, 2018, 9:30am UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/8 "2018-07-26T09:30:07Z")

</div>

I’ve fixed the issue.  
I didn’t have the Vision Module installed.

---

<div class="post-metadata">

**Author:** ![Brahem\_Wajdi](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@Brahem\_Wajdi](https://forum.inductiveautomation.com/u/Brahem_Wajdi)\
**Post date:** [April 12, 2022, 11:18pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/9 "2022-04-12T23:18:29Z")

</div>

Which Module did you have installed ?

---

<div class="post-metadata">

**Author:** ![Andres\_Tejeda](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Andres\_Tejeda](https://forum.inductiveautomation.com/u/Andres_Tejeda)\
**Post date:** [December 9, 2022, 5:39pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/10 "2022-12-09T17:39:33Z")

</div>

You can resolved that using only open(r"path) instead that system.file.openFile without install vision module!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 9, 2022, 5:58pm UTC](https://forum.inductiveautomation.com/t/object-has-no-attribute-openfile/18965/11 "2022-12-09T17:58:03Z")

</div>

> [@Andres\_Tejeda](#):
>
> open(r"path)

It isn't the same thing. `system.util.openFile()` doesn't actually open the file, it shows a dialog where a user can **choose** a file to open, from the local filesystem. It returns the chosen path name, not a jython file object.
