You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Rename variable sometimes fails when using the LanguageServer #477
Extension version (available under the Extensions sidebar): 2018.11.0
OS and version: macOS Mojave 10.14.1
Python version (& distribution if applicable, e.g. Anaconda): python 3.6.4 64-bit conda
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions:
Microsoft Python Language Server version 0.1.60.0
Steps to reproduce:
Make new file, test.py
paste the following:
defiadd_no_overflow(a, b):
"""Perform `a += b` on integer numpy arrays without overflowing"""dest+=srcdest[dest<src] =np.iinfo(dest.dtype).max
Note the file is dirty (not saved). The same happens if the file is saved.
Place cursor on dest and hit F2 or choose Rename symbol. Enter a as name.
Expected behaviour
All occurences of dest are changed into a
Actual behaviour
Got a tooltip Cannot rename, and an error in the Output window:
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Starting Microsoft Python language server.
Microsoft Python Language Server version 0.1.60.0
Initializing for /Users/ciprian/miniconda3/bin/python
[Error - 12:12:43 PM] Request textDocument/rename failed.
Message: Cannot rename
Code: -32000
at Microsoft.Python.LanguageServer.Implementation.Server.Rename(RenameParams params, CancellationToken cancellationToken)
at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Rename(JToken token, CancellationToken cancellationToken)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help):
Nothing. I mean, there are some ERR but from before. I put a console.log and then reproduce the error and nothing new appears in the console.
Activity
MikhailArkhipov commentedon Mar 2, 2019
Requires #577