wtgeographer

Intersect Tool Error

Discussion created by wtgeographer on May 29, 2014
Can anyone tell me why this is not working.

This works...
    arcpy.Intersect_analysis(in_features="'G:/Xcel/Route Tool/Southwest/Scratch.gdb/lines_clip' #",\
    out_feature_class="G:/Xcel/Route Tool/Southwest/Scratch.gdb/lines_clip_Intersect",\
    join_attributes="ONLY_FID",cluster_tolerance="#",output_type="POINT")

This does not?...
import arcpy
import os
from arcpy import env
env.overwriteOutput = 1

'''
lines = arcpy.GetParameterAsText(0)
results = arcpy.GetParameterAsText(1)
'''

lines = r'G:\Xcel\Route Tool\Southwest\Scratch.gdb\lines_clip'
results = r'G:\Xcel\Route Tool\Southwest\Results.gdb'

env.workspace = results

def main():

    print results    
    arcpy.Intersect_analysis(lines,"pts","ONLY_FID","#","POINT")

if __name__ == '__main__':
    main()

Outcomes