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
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