Select to view content in your preferred language

Arcpy DeleteRows tool: error code 000732

1811
11
03-25-2021 09:17 AM
KevinPiraino2
New Contributor III

I have created a simple python script to do the following:

  1. Scrape web page for data listed in table/json
  2. Write data into local FGDB table
  3. Map data in local FGDB using coordinates
  4. Replace SDE data with mapped data in local FGDB

Everything works up until step 4 which includes a DeleteRows function call and then an Append function call. I am using DeleteRows instead of truncate due to database locks. Currently this script works perfectly fine from my local machine, but on our server machine where this script will reside for scheduling purposes I run into the error 000732: dataset does not exist or is not supported. I have run through all of the suggested workarounds/solutions and none worked. I even ran the tool in catalog on the server machine and it worked, just not in the script. 

  1. Make sure file path provided is correct.
  2. Make sure file path provided is not a relative file path.
  3. No spaces in file path name
  4. No misspellings
  5. Backslashes instead of forward slashes
  6. No subtypes
  7. Process runs on windows machine not UNIX or Linux so hopefully no issue with Copy Rows or Make XY Event Layer tools
  8. Disabled background geoprocessing

Are there any additional suggestions or could this possibly be a bug?

0 Kudos
11 Replies
KevinPiraino2
New Contributor III

This is the connection properties for the SDE file on the server machine:

2021-03-25_14-23-02.png

0 Kudos
Lorne
by
New Contributor III

I suggest getting the connection string properties and embedding that into your script. Here's an example for connecting into SQL Server.

fc = "CIMDATA=<CIMStandardDataConnection xsi:type='typens:CIMStandardDataConnection' \
      xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' \
      xmlns:typens='http://www.esri.com/schemas/ArcGIS/2.6.0'> \
      <WorkspaceConnectionString> \
      ENCRYPTED_PASSWORD=XXX0000XXXX; \
      SERVER=TGISDB001SQL; \
      INSTANCE=sde:sqlserver:my_instance; \
      DBCLIENT=sqlserver; \
      DB_CONNECTION_PROPERTIES=My_DataBase; \
      DATABASE=My_Data; \
      USER=user; \
      VERSION=dbo.DEFAULT; \
      AUTHENTICATION_MODE=DBMS \
      </WorkspaceConnectionString> \
      <WorkspaceFactory>SDE</WorkspaceFactory> \
      <Dataset>Mydata.Dataset.FeatureClass</Dataset> \
      <DatasetType>esriDTFeatureClass</DatasetType> \
      </CIMStandardDataConnection>"

 

0 Kudos