Closed igorzhilin closed 7 months ago
Hmmm. Does this also happen in vim? Could you please supply logs?On 10 Jan 2024, at 13:08, igorzhilin @.***> wrote: Description when adding a watch variable in windows nvim, it gives a python error ending with self.expression[ 'frameId' ] = frame[ 'id' ] TypeError: 'NoneType' object is not subscriptable
Is it reproducible in vim? Only broken in Neovim Works with clean config? No Sample project works? Not reproducible with sample project Minimal Reproduction List of steps to reproduce:
on Windows 10 OS Install neovim 0.9.5 winget install Neovim.Neovim Install nvim kickstart git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ pip3 install pynvim Add plugin 'puremourning/vimspector' to %userprofile%\AppData\Local\nvim\init.lua inside clause require('lazy').setup({:
{ "puremourning/vimspector" },
Open nvim Run :VimspectorInstall debugpy Create .vimspector.json file in current dir:
{ "configurations": { "Python": { "adapter": "debugpy", "configuration": { "request": "launch", "cwd": "${fileDirname}", "program": "${file}" } } } }
Create 'sample.py' file in current dir:
my_variable = 0 print(my_variable)
:call vimspector#Launch()
Click "Add" under vimspector.Variables and enter watch expression: my_variable image.png (view on web)
Get the error
... self.expression[ 'frameId' ] = frame[ 'id' ] TypeError: 'NoneType' object is not subscriptable
image.png (view on web)
Full error:
Error detected while processing function vimspector#internal#neowinbar#Do[1]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 5 (python3-script-host):
Traceback (most recent call last):
File "
Expected Behaviour add variable Actual Behaviour python error at self.expression[ 'frameId' ] = frame[ 'id' ] Additional information No response Installation Type Plugin Manager (git clone) Vimspector version 7390842315.0.0 Debug Info No response Log file No response Vim version NVIM v0.9.2
Python version No response Neovim diagnostics No response Operating System windows 10 Declaration
I have read and understood CONTRIBUTING.md I have read and understood the CODE_OF_CONDUCT.md
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
The log that I see with :VimspectorToggleLog
is as follows:
Enter watch expression: my_variableError detected while processing function vimspector#AddWatch[16]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 38 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\debug_session.py", line 60, in wrapper
return fct( active_session, *args, **kwargs )
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\debug_session.py", line 86, in wrapper
return fct( self, *args, **kwargs )
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\debug_session.py", line 1023, in AddWatch
self._variablesView.AddWatch( self._connection,
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\variables.py", line 499, in AddWatch
self.EvaluateWatches( connection, frame )
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\variables.py", line 528, in EvaluateWatches
watch.SetCurrentFrame( fallback_connection, current_frame )
File "C:\Users\i\AppData\Local\nvim-data\lazy\vimspector\python3\vimspector\variables.py", line 179, in SetCurrentFrame
self.expression[ 'frameId' ] = frame[ 'id' ]
TypeError: 'NoneType' object is not subscriptable
I need to note, however, that despite the error, python debugging on windows is working. I am able to add a breakpoint, start the debugging, and it correctly displays my_variable
in the watches.
So it's not that big of an issue. I'll just keep this information here in case somebody gets the same error with vimspector on Windows.
Description
when adding a watch variable in windows nvim, it gives a python error ending with
Is it reproducible in vim?
Only broken in Neovim
Works with clean config?
No
Sample project works?
Not reproducible with sample project
Minimal Reproduction
List of steps to reproduce:
on Windows 10 OS
Install neovim 0.9.5
winget install Neovim.Neovim
Install nvim kickstart
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
pip3 install pynvim
Add plugin 'puremourning/vimspector' to
%userprofile%\AppData\Local\nvim\init.lua
inside clauserequire('lazy').setup({
:Open nvim
Run
:VimspectorInstall debugpy
Create
.vimspector.json
file in current dir:Create 'sample.py' file in current dir:
:call vimspector#Launch()
Click "Add" under
vimspector.Variables
and enter watch expression:my_variable
Get the error
Full error:
Expected Behaviour
add variable
Actual Behaviour
python error at self.expression[ 'frameId' ] = frame[ 'id' ]
Additional information
No response
Installation Type
Plugin Manager (git clone)
Vimspector version
7390842315.0.0
Debug Info
No response
Log file
No response
Vim version
Python version
No response
Neovim diagnostics
No response
Operating System
windows 10
Declaration