[Tutor] Can't find error :-(
Peter Otten
__peter__ at web.de
Sun Aug 28 14:01:38 CEST 2011
Lisi wrote:
> Here is the error message:
> /usr/local/bin/AddressBook: line 6: syntax error near unexpected token `('
> /usr/local/bin/AddressBook: line 6: `name = raw_input("Type the Name -
> leave blank to finish")'
>
> (sorry KMail wrapped it.)
>
> Here is what I typed:
> name = raw_input("Type the Name - leave blank to finish")
>
> Here is what I was copying:
> name = raw_input("Type the Name - leave blank to finish")
>
> Help!! All three are copied and pasted from their relevant places to
> eliminate mis-copying at this stage. What have I miscopied?? The
> original and my copy look to me *exactly* the same.
That's an error message by your shell. You made your script executable, but
forgot to add something like
#!/usr/bin/env python
as its first line.
NB. it's quite common that an error originates before the place where the
interpreter complains; it would have been a good idea to post the five lines
before the explicitly erroneous one, too.
More information about the Tutor
mailing list