# I am getting one issue on one of my script which is working for other windows

**URL:** <https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 18, 2023, 5:54pm UTC](https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274 "2023-12-18T17:54:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kunal\_Purohit1](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Kunal\_Purohit1](https://forum.inductiveautomation.com/u/Kunal_Purohit1)\
**Post date:** [December 18, 2023, 5:54pm UTC](https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274/1 "2023-12-18T17:54:45Z")

</div>

I am attaching the image of it and any one can help me let me know.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59bbcede535e94ea214ab3b0a59229f7d41099d7.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59bbcede535e94ea214ab3b0a59229f7d41099d7.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 18, 2023, 6:03pm UTC](https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274/2 "2023-12-18T18:03:35Z")

</div>

Please post the text of the scripts so we don't have to type them out again. Format them correctly using the \</\> button.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 18, 2023, 9:14pm UTC](https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274/3 "2023-12-18T21:14:45Z")

</div>

1. As @Transistor suggested: we need the code, not a picture (though pictures of the stacktrace are great when you can't copy the stacktrace). At least some of your code is cut off in the screenshot, so I can't see what you're supplying for the `aggregationModes` kwarg.
2. Don't return different value types based on conditions; your `if` block returns an empty list/array, while your `else` block returns a DataSet.

---

<div class="post-metadata">

**Author:** ![Kunal\_Purohit1](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Kunal\_Purohit1](https://forum.inductiveautomation.com/u/Kunal_Purohit1)\
**Post date:** [January 10, 2024, 1:06pm UTC](https://forum.inductiveautomation.com/t/i-am-getting-one-issue-on-one-of-my-script-which-is-working-for-other-windows/83274/4 "2024-01-10T13:06:54Z")

</div>

Thank you a lot.
