Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
improper function calling
#1
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'
Reply
#2
The function you're calling doesn't exist in that module. I certainly don't see it in the list of ArcPy functions.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  calling external function with arguments Wimpy_Wellington 7 1,344 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  Calling a function (which accesses a library) from another file mouse9095 4 767 Jun-07-2023, 08:55 PM
Last Post: deanhystad
Sad Iterate randint() multiple times when calling a function Jake123 2 1,979 Feb-15-2022, 10:56 PM
Last Post: deanhystad
  Calling a class from a function jc4d 5 1,755 Dec-17-2021, 09:04 PM
Last Post: ndc85430
  [Solved] TypeError when calling function Laplace12 2 2,832 Jun-16-2021, 02:46 PM
Last Post: Laplace12
  calling a function and argument in an input phillup7 3 2,554 Oct-25-2020, 02:12 PM
Last Post: jefsummers
  Function Recognises Variable Without Arguments Or Global Variable Calling. OJGeorge4 1 2,208 Apr-06-2020, 09:14 AM
Last Post: bowlofred
  Calling DLL function OptoBruh 0 1,561 Nov-15-2019, 11:51 PM
Last Post: OptoBruh
  Duplicate output when calling a custom function from the same file? road2knowledge 2 2,343 May-10-2019, 07:58 AM
Last Post: road2knowledge
  How can I prevent context switching when calling an async function? AlekseyPython 1 2,806 Feb-20-2019, 10:37 AM
Last Post: AlekseyPython

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020