[Tutor] Creating a Polyline Feature class

Dave Angel d at davea.name
Sun Mar 4 06:06:55 CET 2012


I see Bob Gailer has responded to your message while I was still trying 
to make sense of it.  His "guesses" are probably right on.

I have no knowledge of arcpy, so I can't directly answer your query.  
But I may be able to help you formulate a question that will solicit 
some answers.


On 03/03/2012 11:21 PM, Carie Pigeon wrote:
> I have an assignment to create a polyline feature class of rhino 
> tracks from a csv file.  I am getting an error that says "unbound 
> method add() must be called with Array instance as first argument (got 
> type instance)".  this is for line 104, the line I underlined and put 
> in bold below in my code.  What does this mean?  If there are other 
> obvious code issues, please feel free to comment.  I am unsure if my 
> code is correct.  Thank you for your time!
> Cheers,
> Carie
> <SNIP>
>         coordArray.add(coord)

There's no underline or bold here;  this mailing list is a text based 
one, and attributes are dropped for most of us.
If you want to tag a particular line, use a comment in the code, or put 
a row of dashes after it, or something.

If you import a non-standard library, then give a web link so that 
interested people could actually look it up.  In addition, tell the 
version that you're using.

Similarly, you need to supply the python version, and probably the OS 
environment Windows 94, Atari 4.3, ...)

When giving error messages, supply the whole stacktrace, not just the 
abbreviated error.  The stacktrace would have shown the line that 
actually triggered the error.  And in more complex code, it also would 
have shown the functions that called the one that had the error.

As you surmise, there seem to be a number of problems with the code.  
But judicious use of print statements could have probably given you a 
lot of clues as to what was wrong.



-- 

DaveA



More information about the Tutor mailing list