Running python scripts using the 'relative' path that contains the ArcCatalog connection name outside of an ArcGIS environment

1440
1
04-22-2021 11:57 PM
AndresCastillo
MVP Regular Contributor
0 1 1,440

Esri Technical Support has an article with respect to running python scripts using the 'relative' path that contains the ArcCatalog connection name (i.e 'Database Connections/MyDatabaseName.sde/), outside of an ArcGIS Environment.
 
For example, running from Windows Command Prompt, or Task Scheduler.
 
 
FAQ: Why am I getting "Error 000732, < dataset name > does not exist or is not supported", in a script run outside the ArcGIS environment?
 
 
There is a caveat, in that:
1
as long as you specify the python installation that comes with the ArcGIS install
(C:\Python27\ArcGIS10.4\python.exe python), and
2
also the the sde connection file is stored in the 'Database Connections/MyDatabaseName.sde/ directory (aka the user profile in which the process will be run: C:\Users\<userName>\AppData\Roaming\Esri\Desktop10.4\ArcCatalog), the script will run.
 
This is because that python install is technically part of the ArcGIS Environment.
1 Comment
About the Author
I am really interested in Programming. GeoNet MVP.
Labels