Expected an indented block

Chris Angelico rosuav at gmail.com
Thu Sep 12 11:51:16 EDT 2013


On Fri, Sep 13, 2013 at 1:43 AM,  <altugozgercek at gmail.com> wrote:
> 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
>
> I'm using Sublime Text, same problems occured in TextWrangler and in Vim too. I tried python3 python.py too nothing has changed. Thanks in advance.

Without the code, we can't much help. But look at line 3 - it probably
has an if, while, or for statement. Did you write python.py? Did you
copy and paste it from somewhere? If the latter, make sure you retain
indentation, as it's important to Python - and it's not always
possible to figure out how far things should be indented otherwise.

If python.py isn't very large, you'd do well to simply include its
content in-line here. Including the full traceback (as text, not as an
image) is also extremely helpful. In a few years, this list/newsgroup
thread will be being read by hundreds or thousands of people, not all
of whom will want to click web links to figure out what you're saying
- and that's assuming imgur is still holding your image, which I'm not
sure is guaranteed. Text is reliable!

ChrisA



More information about the Python-list mailing list