Python Forum

Full Version: improper function calling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I gather that I am improperly calling the arcpy module but I am not sure how it is improper.

import os
import arcpy
for root, dirs, files in os.walk(r"C:\SELF\Room\map data"):
    for file in files:
        base=os.path.basename('/root/dir/sub/'+file)
        if file.endswith(".shp"):
            red = "C:\SELF\Room\map data"
            short = file[0:-4]
            blue = red + file
            yellow = 'C:\SELF\Pipedreams'+short +".lyr"
	arcpy.MakeFeatureLayer_conversion(base, yellow)
with error message
Error:
arcpy.MakeFeatureLayer_conversion(base, yellow) AttributeError: 'module' object has no attribute 'MakeFeatureLayer_conversion'
The function you're calling doesn't exist in that module. I certainly don't see it in the list of ArcPy functions.