Geographic Information Systems Asked on January 24, 2021
I am trying to run some code that works fine in Python 2.7 +, but seems to throw an error in a 2.65 environment:
Error: ListFeatureClasses() got an unexpected keyword argument
‘feature_type’ ListFeatureClasses() got an unexpected keyword argument
‘feature_type’
The line of code is simple and works fine in 2.7+:
arcpy.ListFeatureClasses(wildCard,feature_type = 'Polygon')
It throws a the same error in another line of code but for workspace_type = 'FileGDB'
Any ideas how to resolve this?
I am using a super old version of ArcMap (10.0) with Python 2.65.
I was able to overcome this problem by simply removing the keyword and just putting "Polygon" in quotes:
arcpy.ListFeatureClasses(wildCard,"Polygon")
This worked for the other cases as well.
Answered by gwydion93 on January 24, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP