[issue31495] Wrong offset with IndentationError ("expected an indented block")

2019-03-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've retested this under 3.8 and the caret is now positioned at the first character in the line, therefore I'm closing this issue as resolved. -- nosy: +cheryl.sabella resolution: -> works for me stage: -> resolved status: open -> closed versions:

[issue31495] Wrong offset with IndentationError ("expected an indented block")

2017-09-16 Thread Martin Panter
Martin Panter added the comment: Some relevant info I wrote in Issue 25677: ‘The caret points to the character _before_ offset. . . . In some cases (e.g. the line “1 +”), the offset is the string index _after_ the error. But in the case of “1;1 + 1 = 2”, offset is the index where the error

[issue31495] Wrong offset with IndentationError ("expected an indented block")

2017-09-16 Thread daniel hahler
New submission from daniel hahler: Given the following file `t-expected-indent.py`: ``` if 1: foo ``` python t-expected-indent.py reports: ``` File "t-expected-indent.py", line 2 foo ^ IndentationError: expected an indented block ``` However, it should get reported fo

Re: IndentationError: expected an indented block but it's there

2013-05-29 Thread Chris Angelico
On Wed, May 29, 2013 at 2:53 AM, Peter Otten __pete...@web.de wrote: Chris Angelico wrote: On Wed, May 29, 2013 at 2:19 AM, Peter Otten __pete...@web.de wrote: Solution: configure your editor to use four spaces for indentation. ITYM eight spaces. I meant: one hit of the Tab key should add

IndentationError: expected an indented block but it's there

2013-05-28 Thread JackM
Having a problem getting a py script to execute. Got this error: File /scripts/blockIPv4.py, line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers to *is* indented: with open('/var/www/html/mydomain.com

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Michael Torrie
On 05/28/2013 09:32 AM, JackM wrote: Having a problem getting a py script to execute. Got this error: File /scripts/blockIPv4.py, line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers to *is* indented

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Steven D'Aprano
On Tue, 28 May 2013 11:32:06 -0400, JackM wrote: Having a problem getting a py script to execute. Got this error: File /scripts/blockIPv4.py, line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
JackM wrote: Having a problem getting a py script to execute. Got this error: File /scripts/blockIPv4.py, line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers to *is* indented: with open

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Chris Angelico
On Wed, May 29, 2013 at 2:19 AM, Peter Otten __pete...@web.de wrote: Solution: configure your editor to use four spaces for indentation. ITYM eight spaces. But the real solution is to not mix tabs and spaces. Stick to one or the other and you're safe. ChrisA --

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
Chris Angelico wrote: On Wed, May 29, 2013 at 2:19 AM, Peter Otten __pete...@web.de wrote: Solution: configure your editor to use four spaces for indentation. ITYM eight spaces. I meant: one hit of the Tab key should add spaces up to the next multiple of four. Which implies But the real

IndentationError: expected an indented block

2006-11-09 Thread Antonios Katsikadamos
hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following messageIndentationError: expected an indented block.1)what does this mean?2)how can i overcome this problemThanks for any advice.kind regards,Antonios Sponsored LinkMortgage rates near

Re: IndentationError: expected an indented block

2006-11-09 Thread Steve Holden
Antonios Katsikadamos wrote: hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following message IndentationError: expected an indented block. 1)what does this mean? Just what it did the first time you asked. This is a troll to get your

python Error: IndentationError: expected an indented block

2006-11-08 Thread Antonios Katsikadamos
hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following messageIndentationError: expected an indented block.1)what does this mean?2)how can i overcome this problemThanks for any advice.kind regards,Antonios Sponsored Link Free Uniden 5.8GHz Phone

Re: python Error: IndentationError: expected an indented block

2006-11-08 Thread Vyacheslav Sotnikov
Antonios Katsikadamos пишет: hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following message IndentationError: expected an indented block. 1)what does this mean? http://www.python.org/doc/2.4.3/ref/indentation.html 2)how can i overcome

Re: python Error: IndentationError: expected an indented block

2006-11-08 Thread Ben Finney
Please don't post HTML message bodies to a public forum. Antonios Katsikadamos [EMAIL PROTECTED] writes: hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following message IndentationError: expected an indented block. 1)what does this mean? It's

Re: IndentationError: expected an indented block

2006-09-03 Thread Hendrik van Rooyen
Georg Brandl [EMAIL PROTECTED] Wrote: | [EMAIL PROTECTED] wrote: | Hendrik van Rooyen wrote: | [EMAIL PROTECTED] Wrote: | | | | | | Haha. How can I fix this! | | | | | | | | Use either tabs, or spaces, but not both | | - Hendrik | | Haha. I know. I just find it silly that a

Re: IndentationError: expected an indented block

2006-09-02 Thread Hendrik van Rooyen
[EMAIL PROTECTED] Wrote: | | Haha. How can I fix this! | | | Use either tabs, or spaces, but not both - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: expected an indented block

2006-09-02 Thread casioculture
Hendrik van Rooyen wrote: [EMAIL PROTECTED] Wrote: | | Haha. How can I fix this! | | | Use either tabs, or spaces, but not both - Hendrik Haha. I know. I just find it silly that a language insists on indentation. I'd long known it but just was reminded of it when I messed a

Re: IndentationError: expected an indented block

2006-09-02 Thread Georg Brandl
[EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: [EMAIL PROTECTED] Wrote: | | Haha. How can I fix this! | | | Use either tabs, or spaces, but not both - Hendrik Haha. I know. I just find it silly that a language insists on indentation. I'd long known it but just was reminded

IndentationError: expected an indented block

2006-09-01 Thread casioculture
Haha. How can I fix this! -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: expected an indented block

2006-09-01 Thread John Machin
[EMAIL PROTECTED] wrote: Haha. How can I fix this! Haha to you too. Position your cursor at the scene of the crime. Hit the space-bar 4 times. Hit Ctrl-s. Try running it again. If you would prefer a more sensible answer, you might like to ask a more sensible question, which would include a