saulpw/visidata

Python error after pressing SPACE to pull up command-name input

Closed this issue · 3 comments

Small description
The first time I press SPACE on a sheet, I often get the following Python error. It usually succeeds on the second press.

Expected result
Open command prompt.

Actual result with screenshot
Screenshot from 2024-03-03 15-07-48
errors_recent.txt

Steps to reproduce with sample data and a .vd
Open any sheet and press SPACE.
It may take a few attempts. It seems to only happen the first time it is entered on a sheet, and only some of the time.

Additional context
Python 3.8.0
VisiData 3.0.2

This is another error that also very frequently appears instead of the previous error.
errors_recent.txt

Also, many commands such as "guard-sheet" do not populate in the list or execute on one of my computers, even though they are still included in the command list. I've tried uninstalling and reinstalling Visidata, updating pip and Python to the latest version and reinstalling Visidata, made sure to delete the original files from ~/.visidata and run without an rc file, and yet these commands seem not to be available on that machine.

My fix for now on that machine is to downgrade to 2.11. 3.0.2 works well enough on my other computer, despite this intermittent error.

Also, many commands such as "guard-sheet" do not populate in the list or execute on one of my computers, even though they are still included in the command list. I've tried uninstalling and reinstalling Visidata, updating pip and Python to the latest version and reinstalling Visidata, made sure to delete the original files from ~/.visidata and run without an rc file, and yet these commands seem not to be available on that machine.

This is a seperate issue than the original one you posted! Could you please open a new issue with a reproduction?

@NickOveracker
Thanks for bringing this up and documenting it well. I had noticed a related version of this issue, where the command palette came up blank for me occasionally.

Can you try the fix in #2338 and see if it stops the errors you see? You can test it by manually editing one line of features/cmdpalette.py in v3.0.2. (And when you do, you may want to add a second line:
vd.status('testing patch')
so that you can see messages in visidata to be sure you're running your newly edited version.)

I expect it will fix your problems with guard-sheet as well.