In Pycharm I keep running into this error:
TabError: inconsistent use of tabs and spaces in indentation
I know its a problem with tabs/spaces.
I want:
if len(myresults)==0:
print("TEST")
Whenever I type, pressing enter after every line typed I actually type:
if len(myresults)==0:
print("TEST")
Causing this error. How do I fix it? Here are my setting s for pycharm:
Pycharm Settings
I'm probably missing something obvious, but I simply cannot find it.
Try,
Go to Settings --> Editor --> Code Style --> Python --> Tabs and Idents.
Here activate (checkbox) Use tab character AND Smart tabs
Thats works for me.
I'm using Pycharm and Jupyter Notebook and had the same problem with both of them. I could not fix it with "convert Indents", So I uninstalled some of the modules that I was using in my programm and reinstall them and worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With