Skip to content
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

RuntimeError: generator raised StopIteration #25

Open
0xVK opened this issue Aug 22, 2018 · 1 comment
Open

RuntimeError: generator raised StopIteration #25

0xVK opened this issue Aug 22, 2018 · 1 comment

Comments

@0xVK
Copy link

0xVK commented Aug 22, 2018

Приветствую. Установил приложение и после запуска получаю ошибку:

[vitaliy@Notty TelegramTUI]$ ./telegramTUI
Traceback (most recent call last):
  File "/home/vitaliy/Documents/TelegramTUI/src/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 "/home/vitaliy/Documents/TelegramTUI/src/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 "./telegramTUI", line 5, in <module>
    TelegeramTUI.run()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
    return_code = call_function(_SCREEN)    
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
    return self.main()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/apNPSApplicationManaged.py", line 172, in main
    self._THISFORM.edit()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/fm_form_edit_loop.py", line 47, in edit
    self.edit_loop()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/fm_form_edit_loop.py", line 38, in edit_loop
    self._widgets__[self.editw].edit()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/wgboxwidget.py", line 164, in edit
    self.entry_widget.edit()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/wgmultiline.py", line 596, in edit
    self.get_and_use_key_press()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/wgwidget.py", line 575, in get_and_use_key_press
    return self.try_while_waiting()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/wgwidget.py", line 560, in try_while_waiting
    self.parent.parentApp._internal_while_waiting()
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/apNPSApplicationEvents.py", line 41, in _internal_while_waiting
    self.process_event_queues(max_events_per_queue=self.max_events_per_queue)
  File "/home/vitaliy/Documents/TelegramTUI/src/npyscreen/apNPSApplicationEvents.py", line 51, in process_event_queues
    for event in queue.get(maximum=max_events_per_queue):
RuntimeError: generator raised `StopIteration`

Когда изменил функцию до такого вида, завелось:

    def process_event_queues(self, max_events_per_queue=None):
        for queue in self.event_queues.values():
            for event in queue.get(maximum=max_events_per_queue):
                try:
                    self.process_event(event)
                except:
                    pass

Устанавливал по инструкции на Manjaro (Arch based), Python - 3.7.

@vtr0n
Copy link
Owner

vtr0n commented Aug 25, 2018

Благодарю!
Внес коммит.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants