PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Error: missing params.textDocument.text

Open excubo-jg opened this issue 2 years ago • 2 comments

Describe the bug

Starting a programm creates this error message in "show output from - general" .

c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pylance-langserver.bundle.js:1 function a0_0x1596(){const _0xe47295= ['ywjZB2X1DgvvBG','zwXKrxHWCMvZCW','rNjVBq','kIbeDw1WigrLyG','C2L6zwq6ka','DgHLC2LZ','y2fUrxH0CMfJDa','zMf1Bhq','zxHpCLnSAwnL','yw5Jzq','x2DLDfjLz2LVBG','ugfJA2fNzxm','DNnJB2rLlw5VDa','ugfYyw0','uKLtveLd','y2XHC3m','Dg9Rzw5syw5Nzq','CNruzxH0rM9Yqq','x0fdq0vqveve','yMXL','CMLJq2XHC3m','C3vIC3rY','zwjVB2STy2vSBa','sw1WB3j0','C2vUzfjLy29TBq','z2v0uNvSzq','nZm2','BMv3u3LTyM9StG','ChLSyw5JzvvYAq','CM9Wzxj0Eq','DMLZAxrezwW','ig1LC3nHz2u','Cg9ZDe1LC3nHzW','Aw50zwXSAxnLBG','uhjVDMLKzxi','D2fPDa','CMvXDwLYzq','zxrLCKXPC3q','Dg9Rzw5PEMvdyq','tNvSBa','BwL0','C0nVDw50','CIbJB3vUDdO','zgv0ywLSCW','tw9Kzq','y2vSBhm','z2v0tw9KDwXLtG','rxHWCMvZC2LVBG','Bgv2zwW','z2v0sxrLBuf0','rxH0CMfJDcbTzq','CNr5','Dg9dB25JyxrvCG','vw5HBM5VDgf0zq','y2vWDgvK','BwvTyMvYtMfTzq','tMfTzxnbBMrbza','kIb3AgvUihrOzq','x2DLDerLy29Yyq','BJOG','CMvZC0jHCG','CMLHyMXL','q29KzuzVCLr5Ca','zwn0zwq','rxjYB3iGB2nJDq','zw5HyMXLrxH0CG','AgfZvw5LC2nHCa','DxnLzeLTCg9YDa','C3rHCNrnB2rLBa','rgLKig5VDcbMAq','y2HLy2TwywXPza','zxnOzwqGzMfSBa','DxbKyxrLtM90zq','DMLZAxrxAgLSzq','zgvJB3jHDg9Y','C3LTyM9SvgfIBa','y3vTzw50l2rPza','BMnLCW','ksbYB290igrPCG','zMLUzwrwyxjPyq','vgHYzwfKqMfZzq','BgXqCMvMAxG','zgvJB2rLvgv4Da','CMf0Aw9U','y3vZDg9T','CMLZDgLJ','DxnLCKLUzgv4tq','z2v0uM9VDhm','C2v0vg9qB3nPDa','uMvWB3j0uhjVzW','C3rYDwn0DxjL','z1vYAq','x2XVywrk ... [Text cut short as too long to paste]

^ Error: missing params.textDocument.text at _0x36eaa2..handleOpen (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pylance-langserver.bundle.js:1:307537) at _0x4d5c13.onDidOpenTextDocument (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pylance-langserver.bundle.js:1:364801) at notificationHandler (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pyright-internal\src\languageServerBase.ts:498:71) at handleNotification (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pyright-internal\node_modules\vscode-jsonrpc\lib\common\connection.js:606:25) at processMessageQueue (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pyright-internal\node_modules\vscode-jsonrpc\lib\common\connection.js:324:17) at Immediate. (c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist\pyright-internal\node_modules\vscode-jsonrpc\lib\common\connection.js:311:13) at processImmediate (node:internal/timers:466:21)

Expected behavior No error message. It appeared after updating VS

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: Version 17.3.0 Preview 4.0 PTVS version: 17.0.22179.3 Python version: 3.10.4 Debugger Type (if applicable): [New debugger or legacy debugger?]

excubo-jg avatar Jul 22 '22 13:07 excubo-jg

I have the same issue. Seem to be unable to debug python also

eclazi avatar Sep 15 '22 18:09 eclazi

I have the same issue too.

viniciusmcesar avatar Sep 25 '22 18:09 viniciusmcesar

I have the same issue and I cannot fix

bujarkreci avatar Oct 02 '22 16:10 bujarkreci

@bschnurr any update on this? Is there any workaround?

eclazi avatar Oct 25 '22 04:10 eclazi

@bschnurr Is there any eta when the fix it will land upstream?

nkrepo avatar Nov 09 '22 08:11 nkrepo

@bujarkreci @judej any updates?

eclazi avatar Nov 18 '22 20:11 eclazi

Same issue here

chejunkie avatar Nov 25 '22 19:11 chejunkie

@bschnurr - Same issue here, when is fix a due?

swagerakazerotwo avatar Dec 13 '22 15:12 swagerakazerotwo

Anyone have any luck sorting the issue out?

ChaseAndersson avatar Dec 26 '22 06:12 ChaseAndersson

Any update to this issue

mrod0101 avatar Jan 05 '23 17:01 mrod0101

Same problem. pip and pylance isn't installed correctly. In solution explorer delete all virtual enviroments. image Right click Python 3.xx default environment and Manege Python Packages image Select Overview and click Open in PowerShell image Run command in power shell : python -m pip install -U pip Close PowerShell Visual studio python core repaired :) Have fun

meditaym avatar Jan 27 '23 20:01 meditaym

The workaround above is ok but an update on when Microsoft are going to fix this properly in Visual Studio 2022 would be appreciated an awful lot more. I have had to use Visual Studio Code instead as I would be significanlty delayed at present if I waited for Microsoft to resolve the issue. The irony is not lost on me that this works on the "free" tool and doesn't work on the tool my company pays an expensive license for !!

swagerakazerotwo avatar Jan 30 '23 15:01 swagerakazerotwo

Hi @swagerakazerotwo @eclazi @meditaym @mrod0101 @ChaseAndersson @chejunkie The issue shouldn't repro in the latest version of VS anymore. Could you let us know if you're still seeing the issue? Thanks!

StellaHuang95 avatar Apr 19 '23 21:04 StellaHuang95

Still present in VS 17.5.4

micle546 avatar Apr 25 '23 13:04 micle546

Hi @micle546, could you please try it again in the latest preview version of VS(17.6 Preview 5)? VS has a long release cycle, which means that once we have identified and fixed an issue, it may take some time before the fix is incorporated into a new version of Visual Studio that is publicly available. Thanks.

StellaHuang95 avatar Apr 25 '23 19:04 StellaHuang95

@StellaHuang95's suggestion of installing the latest preview version (17.6.0 Preview 5.0) has resolved the 'missing params.textDocument.text' error for me. Prior to this I was receiving updates from the current releases channel.

The error occurs for me when I make simple edits in the text editor, and various other actions around VS, and quite often at that, so it's crippling and at times makes working nearly impossible. It's been an intermittent issue for me since this #7093's creation, so it's nice to have a fix for now.

ekoteq avatar Apr 28 '23 13:04 ekoteq