Just confirmed, it is a problem of the latest codemirror (2.30.0). <br>Previous version (that is still bundled with notebook) don't have that issue.<br><br>Can be reproduced by:<br>1. open  <a href="http://codemirror.net/mode/python/index.html">http://codemirror.net/mode/python/index.html</a><br>

2. go to a first line, type <tab>print<enter>print<enter><br><br>It would result in: a tab in front of a first print statement; 4 spaces in front of the second.<br>This would result in IndentationError in python. And [I take it] ipython just doesnt't show line number in this case.<br>

<br>Dmitry<br><br><br><br><div class="gmail_quote">On Wed, Aug 22, 2012 at 12:42 PM, Matthias BUSSONNIER <span dir="ltr"><<a href="mailto:bussonniermatthias@gmail.com" target="_blank">bussonniermatthias@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Le 22 août 2012 à 21:08, Dmitry Chichkov a écrit :<br>
<div class="im"><br>
> Hi,<br>
><br>
> Wanted to check, if any of you are encountering any IndentationError issues with the notebook, or is it just me?<br>
><br>
> I'm using development version of codemirror (corrected as per README-IPython.rst), and some times I'm encountering:<br>
>    IndentationError: expected an indented block<br>
><br>
> 1. with no line numbers or other context information;<br>
> 2. caused by a mix of '4 spaces' / 'tabs', invisible in the editor;<br>
> 3. by itself caused by codemirror, which disregards a tabMode:"spaces" setting.<br>
<br>
</div>Could you have a look at the javascript console when this append ?<br>
Do you have any traceback from javascript ?<br>
Which OS/browser are you using ?<br>
<div class="im"><br>
><br>
> I've temporarily fixed it for myself, by converting all tabs into 4 spaces during every save.<br>
> And saving/reloading the notebook [if I encounter that problem]. But I'm not entirely happy with that.<br>
<br>
</div>We can activate the visible tab mode of code mirror, this would give you a visual indication of the fact that you have tabs inserted.<br>
Would it help ?<br>
You can open an issue on github if you want so that google better reference it.<br>
<br>
--<br>
Matthias<br>
<div class="im"><br>
><br>
><br>
> Anyone else hitting the same problem?<br>
><br>
><br>
> Thanks,<br>
> Dmitry<br>
</div>> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br>