IndentationError

H

hong zhang

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
 
L

Lie Ryan

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.
 
P

Peter Pearson

Look at the surrounding code. Indentation Errors often lies on the
previous few lines. Possibly caused by unmatching parentheses.

Do you see what's wrong here? ...

Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information..... print x
.... print y
File "<stdin>", line 3
print y
^
IndentationError: unindent does not match any outer indentation level
The problem is that "print y" is indented less than "print x",
meaning that the indented code block containing "print x" is over,
and yet "print y" is *not* indented the same as the "if".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top