AnsweredAssumed Answered

Python script runs perfect on local machine- FAILS running on server

Question asked by apence23 on Apr 3, 2015
Latest reply on Apr 3, 2015 by apence23

Doing a simple geocoding script from a SQL table to Feature Class. When I run it on my local machine everything runs fine- then when I try it on my server (virtual machine) I get this error:

 

Traceback (most recent call last):
  File "C:\scripts\PropertyListings\properties2.py", line 43, in <module>
    arcpy.GeocodeAddresses_geocoding(web_forms_dbo_v_GISPropertyImport, City_of_Auburn_Linear, "Street ADDRESS VISIBLE NONE", sde_master_GIS_USER_PropertyListings, "STATIC")
  File "D:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geocoding.py", line 194, in GeocodeAddresses
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset Databas
e Connections\Webforms@AUBPM01.sde\web_forms.dbo.v_GISPropertyImport does not exist or is not supported
Failed to execute (GeocodeAddresses).

Here's part of my script:

# Import arcpy module
import arcpy
import sys
import string
import smtplib
import pyodbc
import traceback
import time


# Set the Date
Date = time.strftime("%m-%d-%Y", time.localtime())


# Set the time
Time = time.strftime("%I:%M:%S %p", time.localtime())


# Set Environment Variables
arcpy.env.overwriteOutput = True


print "Process started at " + str(Date) + " " + str(Time) + "." + "\n" #Log File Start Time.


# Set up the log file.
LogFile = file('C:\\Temp\\CommercialPropertyImportLog' + '.txt', 'w') #Creates a log file with todays date.
output = open('C:\\Temp\\CommercialPropertyImportLog' + '.txt', 'w') #Path to log file.
output.write(str("Process started at " + str(Date) + " " + str(Time) + "." + "\n")) # Write the start time to the log file.




# Local variables:
web_forms_dbo_v_GISPropertyImport = "Database Connections\\Webforms@AUBPM01.sde\\web_forms.dbo.v_GISPropertyImport"
City_of_Auburn_Linear = "O:\\GeoData\\Databases\\Geocoding.gdb\\City of Auburn Linear"
sde_master_GIS_USER_PropertyListings = "Database Connections\\gis_user@sde_master.sde\\sde_master.GIS_USER.EconomicDevelopment\\sde_master.GIS_USER.PropertyListings"


try:
    print "Starting Geocoding"
    # Process: Geocode Addresses
    arcpy.GeocodeAddresses_geocoding(web_forms_dbo_v_GISPropertyImport, City_of_Auburn_Linear, "Street ADDRESS VISIBLE NONE", sde_master_GIS_USER_PropertyListings, "STATIC")

 

Thanks!

Outcomes