Problem with Intersect_analysis

2969
12
01-09-2013 09:21 AM
DuaneDubey
Emerging Contributor
Hello,

I have a script that is to geocode addresses from a database, intersect the results with three boundary files and do a tabletotable conversion on the results.  Below is the intersect statement I am using.

arcpy.Intersect_analysis([geocode_results, boundary1_shp, boundary2_shp, boundary3_shp], qResults, "ALL", "", "INPUT")


The statement is failing on qResults (e.g. creating the output of the intersect).  It seams that no matter what I put there (file path or variable name), the compiler is appending ".shp.shp" to the file name which causes an invalid file error. 

ERROR 000210: Cannot create output \\mydrive\ArcGIS\Default.gdb\qResults.shp.shp
ERROR 000354: The name contains invalid characters
Failed to execute (Intersect).

Any help, would be greatly appreciated.

Thanks,
Dan
Tags (2)
0 Kudos
12 Replies
DuaneDubey
Emerging Contributor
I found a way around previous issue by writing a VBScript that converts the DBF file into an XLSX file.  I can then read the document and import it into SQL Server. 

However, now I am having an issue with Python.  I have a model that Geocodes addresses and then does an intersect.  The model works perfectly within ModelBuilder.  I then chose Model > Export > To Python Script and saved the script.  I then opened the script with IDLE and ran it. 

I get:

Traceback (most recent call last):
  File "C:\RunningJobs\NewGeocode.py", line 22, in <module>
    arcpy.GeocodeAddresses_geocoding(dbo_CDM_ARCCHANCERY, NewAASD_Streets, "Street 'Full Address' VISIBLE NONE;ZIP ZIP VISIBLE NONE", output_featureclass_shp, "STATIC")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geocoding.py", line 187, in GeocodeAddresses
    raise e
ExecuteError: ERROR 000010: Geocode addresses failed.
Failed to execute (GeocodeAddresses).

Not sure why it works in ModelBuilder but not in Python.  Any insight?

Thanks,

Dan
0 Kudos
DuaneDubey
Emerging Contributor
Anyone????
0 Kudos
JoabelBarbieri
Frequent Contributor

This started happening after the PRO 3.1 (python) upgrade. All my codes are having this issue now and before they were all working fine. Once again they break things and expect us to fix hundreds of automated scripts

0 Kudos