Select to view content in your preferred language

Refresh .pyt files

1014
2
Jump to solution
02-01-2013 08:04 AM
DylanLinet
Emerging Contributor
I am running a .pyt file.
I edit it, and then when I re-run the script in ARC: It acts as if I have not modified the source code and runs the same errors. It even works if I delete the source code.

How do I get it to either
a) check the source code every time
or
b) make it refresh

Thank you!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
T__WayneWhitley
Honored Contributor
Try the tip here, apparently a 'reload' is necessary?  See the webhelp:

http://resources.arcgis.com/en/help/main/10.1/index.html#//001500000038000000


That is, the reload function may be necessary if importing any other modules/scripts into from your pyt code.  Otherwise, your editor may be still open...it refreshes the pyt within ArcGIS when you close it, according to the doc.  Supposedly, you can manually refresh it as well from Catalog as well.

View solution in original post

0 Kudos
2 Replies
T__WayneWhitley
Honored Contributor
Try the tip here, apparently a 'reload' is necessary?  See the webhelp:

http://resources.arcgis.com/en/help/main/10.1/index.html#//001500000038000000


That is, the reload function may be necessary if importing any other modules/scripts into from your pyt code.  Otherwise, your editor may be still open...it refreshes the pyt within ArcGIS when you close it, according to the doc.  Supposedly, you can manually refresh it as well from Catalog as well.
0 Kudos
DylanLinet
Emerging Contributor
Try the tip here, apparently a 'reload' is necessary?  See the webhelp:

http://resources.arcgis.com/en/help/main/10.1/index.html#//001500000038000000


That is, the reload function may be necessary if importing any other modules/scripts into from your pyt code.  Otherwise, your editor may be still open...it refreshes the pyt within ArcGIS when you close it, according to the doc.  Supposedly, you can manually refresh it as well from Catalog as well.


Thank you. This plus a little more digging helped me solve my problem. Turns out there was a syntax error in the script. For some reason it was not reported at run-time (maybe it never is?) and the script just used a previous version that was stored in memory. Once I checked for syntax errors (and fixed them) the script began loading the most recent version again (after of course closing out of my editor).
0 Kudos