Select to view content in your preferred language

ERROR 000732: Input Features

3858
5
Jump to solution
07-22-2015 09:33 AM
ANDRÉS_FERNANDO_CHALARCA_LÓPEZ
Deactivated User

I have the following problem. I'm trying to remotely run a script in python, but when setting the workspace that is not capable.

Next to this locally made script execution in the geographical server and runs smoothly

someone could help me with this error or guide.

This is the command I am trying to run remotely

[ags@serverA ~]$ ssh ags@servergeo nohup /home/ags/arcgis/server/tools/python /app/ovc_prod_gdoc/shapes/export_shape.py "790" "2" "-1" "29" "Veredas" "vereda in \('0002','0003'\)"

This is the error I get

ERROR 000732: Input Features: Dataset Veredas does not exist or is not supported

Failed to execute (MakeFeatureLayer).

0 Kudos
1 Solution

Accepted Solutions
ANDRÉS_FERNANDO_CHALARCA_LÓPEZ
Deactivated User

Hello,

I found the solution for the problem. When python scripts run remotely via SSH and require the arcpy library and where you have .sde files with direct connections, it is important to consider the environment variables that are loaded when you run the script remotely. In this case the problem was that when the session was created remote work regardless ORACLE variables through SSH, which is why to solve this is parameterized on the remote server as follows:

1. The environment file is created in the route ~ home / .ssh / enviroment

      For my case this is the required configuration

     ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1

     PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/opt/app/oracle/product/11.2.0/dbhome_1/bin

2. enable the sshd server passing variables

      Yes PermitUserEnvironment

A you see this is set to proceed with the restart of the SSH server.

View solution in original post

0 Kudos
5 Replies
IanMurray
Honored Contributor

Try using the full file path to the dataset Veredas

0 Kudos
ANDRÉS_FERNANDO_CHALARCA_LÓPEZ
Deactivated User

Thanks for the answer, suggesting the action and did, but I get the same error.

0 Kudos
BlakeTerhune
MVP Regular Contributor

I think Ian Murray is right. How did you format your full file path? Back slashes are special characters in Python and have to be escaped by using a double backslash \\. Alternatively, you could use a single forward slash instead of backslash or prefix the string with r using single backslashes.

  • "c:\\temp\\myGDB.gdb\\Veredas"
  • "c:/temp/myGDB.gdb/Veredas"
  • r"c:\temp\myGDB.gdb\Veredas"
0 Kudos
ANDRÉS_FERNANDO_CHALARCA_LÓPEZ
Deactivated User

Thanks for the answer,

If so does it.

The problem I have is when I run the script remotely.

When I run this locally on the geographical server it is operating correctly.

[ags@servergeo ~]$ /home/ags/arcgis/server/tools/python /app/ovc_prod_gdoc/shapes/export_shape.py "790" "2" "-1" "29" "Veredas" "vereda in ('0002','0003')"

0 Kudos
ANDRÉS_FERNANDO_CHALARCA_LÓPEZ
Deactivated User

Hello,

I found the solution for the problem. When python scripts run remotely via SSH and require the arcpy library and where you have .sde files with direct connections, it is important to consider the environment variables that are loaded when you run the script remotely. In this case the problem was that when the session was created remote work regardless ORACLE variables through SSH, which is why to solve this is parameterized on the remote server as follows:

1. The environment file is created in the route ~ home / .ssh / enviroment

      For my case this is the required configuration

     ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1

     PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/opt/app/oracle/product/11.2.0/dbhome_1/bin

2. enable the sshd server passing variables

      Yes PermitUserEnvironment

A you see this is set to proceed with the restart of the SSH server.

0 Kudos