Python Forum
improper function calling - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: improper function calling (/thread-11965.html)



improper function calling - gbaker555 - Aug-02-2018

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'



RE: improper function calling - ichabod801 - Aug-03-2018

The function you're calling doesn't exist in that module. I certainly don't see it in the list of ArcPy functions.