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

How to fix this error? #12

Open
somenormalguy7 opened this issue Aug 22, 2019 · 3 comments
Open

How to fix this error? #12

somenormalguy7 opened this issue Aug 22, 2019 · 3 comments

Comments

@somenormalguy7
Copy link

somenormalguy7 commented Aug 22, 2019

\Desktop\keylogger>python logger.py
File "logger.py", line 154
risk_score += 5
^
TabError: inconsistent use of tabs and spaces in indentation

@NullArray
Copy link
Owner

Yeah that probably happened when i committed the code to the repo. If you have your Text Editor or IDE handy and you open the source in there, you probably have an option where you can select the type of indentation and the width of them for the entire file.

Do that, save, and check if it's resolved.

@Vinothini10
Copy link
Contributor

Hi ,
I guess you have mixed tabs & spaces while writing Python code,there should be consistent eiether space or tabs for each looping structure you write,try to format using visual studio it will be helpful

@NullArray
Copy link
Owner

Hi ,
I guess you have mixed tabs & spaces while writing Python code,there should be consistent eiether space or tabs for each looping structure you write,try to format using visual studio it will be helpful

Yeah i definitely should. In general though, i code most of my scripts in Geany. I have VS Code for Linux but i tend to only use it for cross platform development when working with .NET Core and related langs, for instance.

Usually with Geany i simply select all the code and run an operation that's usually effective at transforming the indentation into one type either spaces or tabs.

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

3 participants