You are not logged in.

#1 2012-10-13 17:41:48

ayr0
Member
Registered: 2010-08-12
Posts: 87

[SOLVED] Ipython indentation Error

Hi,

I get this error every time I start IPython2 in my home directory.  If I start if from any other directory, there is no error.  Any ideas on how to fix this?

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/IPython/__init__.py", line 43, in <module>
    from .config.loader import Config
  File "/usr/lib/python2.7/site-packages/IPython/config/__init__.py", line 16, in <module>
    from .application import *
  File "/usr/lib/python2.7/site-packages/IPython/config/application.py", line 29, in <module>
    from IPython.external.decorator import decorator
  File "/usr/lib/python2.7/site-packages/IPython/external/decorator/__init__.py", line 4, in <module>
    from _decorator import *
  File "/usr/lib/python2.7/site-packages/IPython/external/decorator/_decorator.py", line 39, in <module>
    import sys, re, inspect
  File "/usr/lib/python2.7/inspect.py", line 39, in <module>
    import tokenize
  File "tokenize.py", line 13
    
                ^
IndentationError: expected an indented block

Last edited by ayr0 (2013-03-06 08:23:53)

Offline

#2 2012-10-15 15:31:55

mike_r
Member
Registered: 2009-01-22
Posts: 114

Re: [SOLVED] Ipython indentation Error

Dumb question - you don't have a tokenize.py file in your home directory, do you? I've gotten busted by that type of problem more times than I care to admit.

Mike


Linux User #353 - SLS -> Slackware -> Red Hat -> Mandrake -> Fedora -> Arch

Offline

#3 2013-03-06 08:23:38

ayr0
Member
Registered: 2010-08-12
Posts: 87

Re: [SOLVED] Ipython indentation Error

I realize this is old.  I kept having the same problem, and when I searched the forums, found my old thread.

So, yeah, I had a tokenize.py in my home directory. I removed it and everything works like a charm!  Marking as solved.

Offline

Board footer

Powered by FluxBB