Skip to content Skip to sidebar Skip to footer

Is There Something Issue In Indentation, While Using Anaconda's Spyder

from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support impor

Solution 1:

It is strange behavior but maybe somehow file selenium\webdriver\remote\errorhandler.py was broken.

You can open this file in text editor which has function "convert tabs to spaces", use this function and save it back to the same file.

Solution 2:

This error message...

IndentationError: unindent does notmatchanyouter indentation level

...implies that there are indentation issues with in the lines of code.

Apparently, I don't see any indentation issue with in the lines of code you have published. However, there is a possibility of Space characters mixed in with your Tab.


Solution

There are different solutions as per the IDE you are using as follows:

  • Try to search and replace all the tabs with a few spaces as Spaces are the preferred method for indentation.
  • In you can set or unset by checking or unchecking to use tabs for indentation:

    View--> Indentation --> Convert Indentation to Tabs
  • To fugure out the tabs/spaces issue you can use tabnanny as follows:

    python -m tabnanny your_python_file.py
    
  • Within the Python editor, select all the code/text and do the following:

    Go to Format -> Untabify Region
    
  • Incase you are using , press Esc and do the following to auto indent everything and will clear up any spaces you have .

  • On Atom, go to:

    Packages > Whitespace > Convert Spaces to Tabs
    

Post a Comment for "Is There Something Issue In Indentation, While Using Anaconda's Spyder"