Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabError: inconsistent use of tabs and spaces in indentation #163

Closed
ColinDuquesnoy opened this issue Jun 9, 2016 · 7 comments
Closed

Comments

@ColinDuquesnoy
Copy link

Hello,

I've tried to install rope from master branch, but it failed with the following error:

Obtaining rope from git+git://github.com/python-rope/rope.git@master#egg=rope (from -r requirements-dev.txt (line 2))
  Updating ./src/rope clone (to master)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/colin/Documents/hackedit-python/src/rope/setup.py", line 10, in <module>
        import ropetest
      File "/home/colin/Documents/hackedit-python/src/rope/ropetest/__init__.py", line 21, in <module>
        import ropetest.refactor
      File "/home/colin/Documents/hackedit-python/src/rope/ropetest/refactor/__init__.py", line 8, in <module>
        import ropetest.refactor.extracttest
      File "/home/colin/Documents/hackedit-python/src/rope/ropetest/refactor/extracttest.py", line 994
        code = 'def a_func():\n    for i in range(10):\n        a = i\n    else:\n        a=None\n'
                                                                                                  ^
    TabError: inconsistent use of tabs and spaces in indentation

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/colin/Documents/hackedit-python/src/rope/
@mcepl
Copy link
Contributor

mcepl commented Jun 9, 2016

Good person committing 7232b26 broke our code.

@ColinDuquesnoy
Copy link
Author

Thank you!

soupytwist pushed a commit that referenced this issue Aug 8, 2016
@MarekLew
Copy link

MarekLew commented Oct 1, 2016

Sorry about that. 7232b26 is my first fix. Unfortunately, I relied solely on testing and installing "python setup.py install".

@mcepl
Copy link
Contributor

mcepl commented Oct 1, 2016

@MarekLew don't worry about it, happens ... just next time make sure to run python setup.py clean build test before pushing the commit. Thank you.

@MarekLew
Copy link

MarekLew commented Oct 3, 2016

@mcepl Yes It's happens
I tested this on two computers and 3 systems before committing.
On Ubuntu (14.04,14.06) and python 2.7.12 all test passed.
On windows 7 more test fault(I don't care this.).
Changing editor helped ;)

@kao123
Copy link

kao123 commented Jun 2, 2017

obviously i am a bit late, but i'm training to run a program (python 2.7) on windows 10 and i get a indentation error. although i'm using the exact same code on ubuntu and it is running perfectly.. does
same code on ubuntu and it is running perfectly.. how can I fix it??

@soupytwist
Copy link
Contributor

This issue was not windows-specific, so probably not the right forum.

Using spaces instead of tabs might help clear up your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants