# System.util.retarget error when trying to open a window in another project

**URL:** <https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [November 19, 2020, 5:36pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809 "2020-11-19T17:36:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [November 19, 2020, 5:36pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/1 "2020-11-19T17:36:16Z")

</div>

Hi guys,  
trying to us the system.util.retarget (“Project”,[“SomeWindowPath”]) with 8.0.16 and it keeps erroring out saying “Error Launching application: HttpResponseException: 404: Notfound”  
I tried the script without the window path and it opens fine. I copied the window path right out of the 8.0.16 designer. has something changed with the naming of window paths I did not know?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/21c3bbdf000aab1003b4303ff2c9a610df2c1969.png)

Just to clarify, the project name or window paths have not changed. I imported my 7.9.12 in and upgraded the whole thing to 8.0.16 so there should be no naming problems.

Thanks

---

<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 19, 2020, 5:41pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/2 "2020-11-19T17:41:09Z")

</div>

In the script where you’re calling `system.util.retarget`, are you specifying the other gateway address with `/main` at the end? If so, try removing that `/main`.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [November 19, 2020, 5:42pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/3 "2020-11-19T17:42:28Z")

</div>

Hi Paul,  
I did see that in other topics users put on here. no in this case this project resides on the same gateway as the source project.  
I even tried to put the address of the same project in just for fun and still no luck.

---

<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 19, 2020, 5:43pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/4 "2020-11-19T17:43:48Z")

</div>

Ah, didn’t read your message closely enough. Is the project you’re trying to retarget to an inheritable project, by any chance?

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [November 19, 2020, 5:45pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/5 "2020-11-19T17:45:36Z")

</div>

it is not. all my projects are on their own. both destination project and source project are enabled and none of them are inheritable.  
again, weird thing is if I put just the project name, it goes in fine. The moment I put a window path, it doesn’t like it.

---

<div class="post-metadata">

**Author:** ![jcoffman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcoffman/32/6429_2.png) [@jcoffman](https://forum.inductiveautomation.com/u/jcoffman)\
**Post date:** [November 19, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/6 "2020-11-19T17:49:51Z")

</div>

can you post the script line for retargeting? are you using keyword arguments for the script?

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [November 19, 2020, 5:51pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/7 "2020-11-19T17:51:35Z")

</div>

Hi J,  
In 7.9.12 I was using  
system.util.retarget(“Audits”, None, None, [“Shipping/OB\_Shipping/Outbound Shipping”])  
in 8.0.16 I changed it to  
system.util.retarget(“Audits”, [“Shipping/OB\_Shipping/Outbound Shipping”])  
Since it did not like the None’s

---

<div class="post-metadata">

**Author:** ![jcoffman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcoffman/32/6429_2.png) [@jcoffman](https://forum.inductiveautomation.com/u/jcoffman)\
**Post date:** [November 19, 2020, 5:53pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/8 "2020-11-19T17:53:44Z")

</div>

you could change it to this:  
`system.util.retarget("Audits", windows=["Shipping/OB_Shipping/Outbound Shipping"])`  
which i would expect to work

The reason for this is the 2nd arg (when not using [keyword arguments](https://docs.inductiveautomation.com/display/DOC79/User+Defined+Functions#UserDefinedFunctions-KeywordArguments)) is expected to be a Gateway Address or list of addresses, so the retarget function is looking for a gateway at `"Shipping/OB_Shipping/Outbound Shipping"` which will obviously fail.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [November 19, 2020, 5:57pm UTC](https://forum.inductiveautomation.com/t/system-util-retarget-error-when-trying-to-open-a-window-in-another-project/40809/9 "2020-11-19T17:57:12Z")

</div>

Thanks, the window=[] did work.
