Search code examples
pythonindentation

Python indentation error between two text-editors


I have a weird problem right now in python3.

I have a script with the correct indentation, but when I compile it says I have inconsistent use of tabs or spaces.

I'm using geany, so in geany it is correct indentation, but when I open the file in vim it's all wrong. But when I fix the problem in vim it's all wrong in geany and the compiler will tell me whats wrong (in geany). So either way I'm stuck now.

Is there a way to fix this?


Solution

  • I have faced similiar problems when using notepad++ editor, When I am doing editing using notepad++ I have faced same kind of identation error.

    I have replaced every tabs with 5 spaces & I am able to solve identation error in my script.

    I hope doing same work for you.