Prev: umath import error for Numpy builds on OSX 10.6
Next: Porting pyftpdlib to Python 3.x: question about tarball namingconvention
From: hong zhang on 9 Dec 2009 14:32 List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError: unindent does not match any outer indentation level Thanks for help. --henry
From: Ben Finney on 10 Dec 2009 19:58 hong zhang <henryzhang62(a)yahoo.com> writes: > I got error says IndentationError in end of line. > I could not figure out why. Nor can we, without seeing the code to compare indentation levels. > Thanks for help. Please construct a minimal example (not a whole huge program), that we can run to show the behaviour you're seeing. -- \ “Any intelligent fool can make things bigger and more complex… | `\ It takes a touch of genius – and a lot of courage – to move in | _o__) the opposite direction.” —Albert Einstein | Ben Finney
From: Terry Reedy on 10 Dec 2009 19:58 hong zhang wrote: > List, > > I got error says IndentationError in end of line. > I could not figure out why. See following: > > $ ./cont-mcs > File "./cont-mcs", line 264 > mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val > ^ > IndentationError: unindent does not match any outer indentation level Look at previous lines. Make sure you only use tabs or only use spaces and not both. If you still need help, post all code back to last unindented line.
From: Gabriel Genellina on 10 Dec 2009 20:36 En Wed, 09 Dec 2009 16:32:18 -0300, hong zhang <henryzhang62(a)yahoo.com> escribi�: > I got error says IndentationError in end of line. > I could not figure out why. See following: > > $ ./cont-mcs > File "./cont-mcs", line 264 > mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val > ^ > IndentationError: unindent does not match any outer indentation level The caret ^ might be misplaced; look at start of line 264, or perhaps the previous line. Remember not to mix tabs and spaces. -- Gabriel Genellina
From: Lie Ryan on 10 Dec 2009 20:57
On 12/10/2009 6:32 AM, hong zhang wrote: > List, > > I got error says IndentationError in end of line. > I could not figure out why. See following: > > $ ./cont-mcs > File "./cont-mcs", line 264 > mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val > ^ > IndentationError: unindent does not match any outer indentation level > Look at the surrounding code. Indentation Errors often lies on the previous few lines. Possibly caused by unmatching parentheses. |