what the heck does this mean?

Remco Gerlich remco at gerlich.nl
Thu Dec 13 05:49:11 EST 2007


On Dec 13, 2007 4:57 AM, katie smith <iceboy127 at yahoo.com> wrote:

> Traceback (most recent call last):
>   File "C:\Python25\empire\Empire Strategy.pyw", line 322
>     Maty = Searched(number)
> TypeError: 'list' object is not callable
>

This is the error message. The first line basically says "This is what
happened:"

The second shows the file, and the line number.

The third is the actual line.

Then the error message: you had a list object, and you tried to call it.

Well, looking at that line, we see Searched(number). Search is apparently a
list, and you used ( ) on it, which tries to call it, but that's not
possible.
So that's the mistake - you meant to use [ ], but used ( ).


> so Maty Searched(number is supposed to give me 0 when
>         Search = "NewMap"
>         number = 0
>         bignum = 1
>         bignumer = repr(bignum)
>         Searching = Search+bignumer
>         Searched = eval(Searching)
>         Maty = Searched[number]
>

This isn't the actual code that gave the error message - here you used  [
].

>

Anyway, doing it like this is really bad and likely to go wrong, but that's
not your question.

Remco Gerlich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071213/465838f1/attachment.html>


More information about the Python-list mailing list