-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npyscreen dosen't work #116
Comments
The latest release on PyPI doesn't work on versions above 3.6 (possibly 3.7). According to this issue #108 there have been commits to allow npyscreen to run on 3.8, those changes just haven't been pushed to a new version on PyPI. The same issue has a workaround. It would seem this project doesn't get any love anymore! |
Might explain why the example results in a basic ncurses initialization problem in 3.8. Example: MyForm = Form()
usrn_box = MyForm.add_widget(TitleText, name="Your name:")
internet = MyForm.add_widget(TitleText, name="Your favourite internet page:")
MyForm.edit()
# usrn_box.value and internet.value now hold the user's answers. Exception:
|
Hello. I'm using Python 3.8.3 and Windows 10, but I can't run this program:
import npyscreen
class MyForm(npyscreen.FormBaseNew):
def create(self):
# BoxTitle used multiline
obj = self.add(npyscreen.BoxTitle, name="test", custom_highlighting=True, values=["first line", "second line"])
color1 = self.theme_manager.findPair(self, 'DANGER')
color2 = self.theme_manager.findPair(self, 'IMPORTANT')
obj.entry_widget.highlighting_arr_color_data = [[color1,color1,color2],[color2,color1,color2,color2]]
class App(npyscreen.StandardApp):
def onStart(self):
self.addForm("MAIN", MyForm)
obj = App()
obj.run()
========================================RESULTS=====================================
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplicationEvents.py", line 16, in get
yield self.interal_queue.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplicationEvents.py", line 18, in get
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:/Users/Хозяин/Desktop/PyProgect/Programms/for_tests.py", line 19, in
obj.run()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplication.py", line 30, in run
return npyssafewrapper.wrapper(self.__remove_argument_call_main)
File "C:\Program Files\Python38\lib\site-packages\npyscreen\npyssafewrapper.py", line 41, in wrapper
wrapper_no_fork(call_function)
File "C:\Program Files\Python38\lib\site-packages\npyscreen\npyssafewrapper.py", line 97, in wrapper_no_fork
return_code = call_function(_SCREEN)
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplication.py", line 25, in __remove_argument_call_main
return self.main()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplicationManaged.py", line 172, in main
self.THISFORM.edit()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\fm_form_edit_loop.py", line 47, in edit
self.edit_loop()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\fm_form_edit_loop.py", line 38, in edit_loop
self.widgets[self.editw].edit()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\wgboxwidget.py", line 150, in edit
self.entry_widget.edit()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\wgmultiline.py", line 581, in edit
self.get_and_use_key_press()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\wgwidget.py", line 575, in get_and_use_key_press
return self.try_while_waiting()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\wgwidget.py", line 560, in try_while_waiting
self.parent.parentApp._internal_while_waiting()
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplicationEvents.py", line 41, in _internal_while_waiting
self.process_event_queues(max_events_per_queue=self.max_events_per_queue)
File "C:\Program Files\Python38\lib\site-packages\npyscreen\apNPSApplicationEvents.py", line 51, in process_event_queues
for event in queue.get(maximum=max_events_per_queue):
RuntimeError: generator raised StopIteration
The text was updated successfully, but these errors were encountered: