Violin program in python, I came across the following error. “python error indentationerror expected an indented block”. What does indentation error in python mean? How can I fix this indentation error in python?
python error indentationerror expected an indented block.
When you see python error like indentation error. Fix this error by changing all the tabs to spaces or all the spaces to tabs.
indentation error usually occurs with the mix of spaces and tabs.
So make a habit in python programming to use tabs or spaces. Not combination of both.
How to fix indentation error in python :
When sing Sublime, first select all, and click on the option ‘Python’ at bottom right. Here check ‘Indent using spaces‘ and fix your Tab Width to be consistent, then Convert Indentation to Spaces to convert all tabs to spaces, and vice versa if you want tabs.
If you are a python programmer, learn some best practices available to handle python errors.