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

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

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

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.

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.

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

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.

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

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

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) 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.

1 Like

Thanks, the window=[] did work.

1 Like