Ask questionsrename feature failed with 'Refactor failed'
"python.jediEnabled"
set to; more info #3977): not enableExpect rename success.
An Error as “Refactor failed”
<!-- Note: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ . -->
Refactor failed. Syntax error in file <this_is_my_code.py> line <177>: unindent does not match any outer indentation level [<FrameSummary file refactor.py, line 294 in watch>, <FrameSummary file refactor.py, line 275 in _process_request>, <FrameSummary file refactor.py, line 206 in _rename>, <FrameSummary file refactor.py, line 117 in refactor>, <FrameSummary file refactor.py, line 138 in onRefactor>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/refactor/rename.py, line 23 in init>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/base/project.py, line 116 in get_pymodule>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/base/pycore.py, line 142 in resource_to_pyobject>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/base/pycore.py, line 255 in get_pymodule>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/base/pyobjectsdef.py, line 162 in init>, <FrameSummary file /home/hkb/anaconda3/lib/python3.7/site-packages/rope/base/pyobjectsdef.py, line 191 in _init_source>]
Answer
questions
karthiknadig
We use https://github.com/python-rope/rope for refactoring. Looks like there might have been an indentation issue in your code. If you feel there is still an issue please report it to the linked repository.
Related questions