kernel restart when "option, index = pick(options, title)"
Pertii opened this issue · 4 comments
I'm new to Python, i don't know why this code "option, index = pick(options, title)" make my kernel reboot. I've installed pick by "pip install pick" and i imported it correctly with "from pick import pick". I'm working on anaconda on win11.
This is the full code
from pick import pick
title = 'Please choose filter: '
options = ['trending', 'hot', 'created', 'promoted']
option, index = pick(options, title)
I have no idea because I don't have a windows computer. Can you still reproduce this?
Hi @wong2, I suspect I'm running into the same problem.
Minimum working example:
from pick import pick
testpick = ['test1', 'test2', 'test3']
a,b = pick(testpick, 'Test Pick')
This produces the error when the pick() function is called:
LINES value must be >= 2 and <= 132: got -38521
initscr(): Unable to create SP
I'm running Python 3.7 (32-bit) on Windows 10 and using Visual Studio 2019 as an IDE.
If I re-run the MWE above, the "got" number is different every time.
@InvisibleWaves according to a comment from https://stackoverflow.com/questions/70084286/lines-value-must-be-2-and-168-got-1-initscr-unable-to-create-sp
curses is generally not going to work from within an IDE - try running it directly from a terminal window.
Close as IDE terminals are not supported.