Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54059

Re: Expected an indented block

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!gordon
From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Expected an indented block
Date Thu, 12 Sep 2013 15:57:19 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 26
Message-ID <l0so8v$p43$1@reader1.panix.com> (permalink)
References <eba80aa0-d13d-45ca-ba5e-f0006d7721e3@googlegroups.com>
NNTP-Posting-Host panix1.panix.com
X-Trace reader1.panix.com 1379001439 25731 166.84.1.1 (12 Sep 2013 15:57:19 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Thu, 12 Sep 2013 15:57:19 +0000 (UTC)
User-Agent nn/6.7.3
Xref csiph.com comp.lang.python:54059

Show key headers only | View raw


In <eba80aa0-d13d-45ca-ba5e-f0006d7721e3@googlegroups.com> altugozgercek@gmail.com writes:

> Hey guys ! its my first topic and I'm gonna start with a problem :) Im
> totally beginner in Python and each time I try to run this program it
> gives me the error down below:

> http://imgur.com/ufUAMTs

That error involves the previous program line, which your screenshot
doesn't show, so it's hard to say exactly what the problem is.

However, I'll take a guess that the previous line is an "if" statement,
which requires that the following line be indented.  Did you indent the
print statement?

This error can also be caused by using a mix of tabs and spaces on the
same line.  Don't do that.

(And by the way, it's generally better to post errors and code as text
instead of a screenshot.)

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Expected an indented block altugozgercek@gmail.com - 2013-09-12 08:43 -0700
  Re: Expected an indented block John Gordon <gordon@panix.com> - 2013-09-12 15:57 +0000
  Re: Expected an indented block Chris Angelico <rosuav@gmail.com> - 2013-09-13 01:51 +1000

csiph-web