redmellie

Attribute error, object has no attribute

Discussion created by redmellie on Mar 21, 2014
Latest reply on Mar 22, 2014 by redmellie
So I am very new to python and working through my first online course. Does anyone know how I can fix this error:

>>> arcpy.Clip_analysis("RI_Sewers","Providence","C:/student/PythEveryone10_1/PythonInArcGIS/RhodeIsland.gdb/Sewers2","#")
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Clip_analysis'
>>>
>>>
I have updated my PYTHONPATH and tried importing arcpy.conversion. Some functions work in arcpy, but not all functions. For example the arcpy.mapping.ListLayoutElements function works fine, but clipping and buffers return the error above. I can run the clip and buffer tools fine.

I also tried running arcpy in Pythonwin and got the following error:
  File "C:\ESRI\Python27\ArcGIS10.1\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\student\PythEveryone10_1\HandleErrors\Debugging.py", line 11, in <module>
    arcpy.Buffer_analysis(streams, streams + str(buff), buff)
AttributeError: 'module' object has no attribute 'Buffer_analysis'


I know the scripts I am running are written correctly because they are straight from the esri online course and they worked on Tuesday, but something has been corrupted since Tuesday and now they don't run.

Thanks

Outcomes