Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using arc 10.2. Every time I add an array both python 2.7 and as a tool in Arc I am getting a "TypeError: Abstract Class". I have also tried changing my script multiple times to make the array differently but every time I call on the arcpy.Array() I get this error.

I have run the script on other computers with Arc and it works perfectly so I can't see an error with the script.

I tried uninstalling and reinstalling ArcGIS. I tried reverting back to 10.1 and 10.0 and I still get the same error.

share|improve this question
1  
It would be better to post a codes snippet whereas troubleshooting gets cleared. –  SIslam Aug 8 at 6:39
    
I have multiple scripts working perfectly on other computers; however my computer they just don't work. So I don't think its an error in the code –  Chris Aug 8 at 6:44
    
Please include a code snippet. Personally, if one machine behaves differently to others I would uninstall ArcGIS for Desktop, remove all traces of Python, and then let the reinstall of ArcGIS for Desktop take care of installing Python. –  PolyGeo Aug 9 at 0:11

2 Answers 2

up vote 0 down vote accepted

Problem solved. I uninstalled all ArcGIS components and deleted all traces of Python and ArcGIS. Then installed ArcGIS and let it install components of Python again. Now the scripts work.

Maybe there was a problem when I first installed ArcGIS with the Python components.

share|improve this answer

I don't know how to fix it, but before Python 2.6.x there was no explicit way to declare an abstract class. It changed with the abc (Abstract Base Class) module now available from the standard library in Python 2.7. I'm getting the same error with this line of code.

partGeom = arcpy.Geometry("polygon", arcpy.Array(trPoints))

The variable partGeom probably needs to be declared now...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.