# Ghost script (Cached? unwanted)

**URL:** <https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547>\
**Category:** Ignition\
**Tags:** python\
**Created:** [September 25, 2019, 2:06pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547 "2019-09-25T14:06:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 2:06pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/1 "2019-09-25T14:06:43Z")

</div>

I have a button running a script. I got an error during runtime in the client that did not seem relevant to my button’s mouse event script. After reviewing my pythong code, I saw that the indicated object was not even being used. I cleared all scripting out of the button events, totally blank now. Saved and ran the client again getting the same results. Is ignition holding on to an old cache of script? This is an issue since after a number of tries and variations, I can no longer have any type of sscript in this button since the client will always run some old faulty script.

Help!

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 25, 2019, 3:04pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/2 "2019-09-25T15:04:05Z")

</div>

post the error message that you are seeing, also have you tried deleting the button to see if the error pops up with it completely gone? There is a diagnostics window under the help menu of a client that is helpful for debugging.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 3:11pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/3 "2019-09-25T15:11:51Z")

</div>

Error with some of window in background. I am not using to PyDataSet anywhere in my code. I tried it once a month ago and cannot seem to get rid of it.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/ce47f3e7a51bd1ee07e7838dd0a8fb1540e6f479.png)

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 3:17pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/4 "2019-09-25T15:17:08Z")

</div>

Interesting you should mention the diagnostics window. I also cannot get my menubar to show at all. I have made the appropriate changes in the project properties and still…nothing.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 3:19pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/5 "2019-09-25T15:19:40Z")

</div>

With button removed. still get exact same error message.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 25, 2019, 3:24pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/6 "2019-09-25T15:24:01Z")

</div>

The hot key for the diagnostics window is control+shift+f7. try using find/replace to search all of your scritping to see if you have ‘toPyDataSet’ somewhere you forgot about.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [September 25, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/7 "2019-09-25T15:28:47Z")

</div>

> [@lrhyrne](#):
>
> I also cannot get my menubar to show at all. I have made the appropriate changes in the project properties and still…nothing.

Showing or hiding the menubar in a Vision Client requires a client restart, so that's normal. As dkhayes117 suggested, use Ctrl+Shift+F7

Looking at the error message popup in the client under the "Message" tab (alternatively, check Diagnostics \> Console), do you see the component name? I'm wondering if there is another component on that window (maybe the window itself) that has a mouseRelease script defined, and it's consuming the mouse click.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 5:29pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/8 "2019-09-25T17:29:32Z")

</div>

OK, so the diagnostic console window shows the same portion of script trying to run. I have also deleted all the Ignition cache since my last reply.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 25, 2019, 5:40pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/9 "2019-09-25T17:40:51Z")

</div>

I would still use Find/Replace in the designer under edit menu. Search for ‘toPyDataSet’ and see if the script exists in the project.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 6:10pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/10 "2019-09-25T18:10:04Z")

</div>

No occurrence of ‘toPyDataSet’ using the find/replace utility. Interesting thought. I’m trying to see how far Ignition will take this ghost script. I created a new client and a new similar screen with button and simple script showing a messaageBox(). Still throws exception on ‘toPyDataSet’…!?!

-Leif

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 25, 2019, 6:16pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/11 "2019-09-25T18:16:34Z")

</div>

The best thing may be to contact Inductive Automation support, if you don’t pay for the support you can still get email support for free at a lower priority.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [September 25, 2019, 6:17pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/12 "2019-09-25T18:17:15Z")

</div>

I figured as much. Will post back to thread with solution.

---

<div class="post-metadata">

**Author:** ![lrhyrne](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrhyrne/32/12097_2.png) [@lrhyrne](https://forum.inductiveautomation.com/u/lrhyrne)\
**Post date:** [October 2, 2019, 6:39pm UTC](https://forum.inductiveautomation.com/t/ghost-script-cached-unwanted/28547/13 "2019-10-02T18:39:20Z")

</div>

Support did not help much. I did keep trying to work on this button’s script though and still kept my eye out for the toPyDataSet call. I found it one time and removed it followed by saving everything and getting a gateway backup. No problems since.
