jwoglom / signal-curses

Curses-backed terminal interface for Signal using signal-cli
GNU General Public License v3.0
73 stars 9 forks source link

Error running main.py after linking to account #7

Closed alxjsn closed 5 years ago

alxjsn commented 5 years ago

I get the following error trying to run main.py. It only does this after signal-cli has been linked to an account.

Traceback (most recent call last):
  File "/usr/lib/python3.7/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 "/usr/lib/python3.7/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 "main.py", line 1002, in <module>
    signal.run()
  File "/usr/lib/python3.7/site-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/usr/lib/python3.7/site-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/usr/lib/python3.7/site-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
    return_code = call_function(_SCREEN)    
  File "/usr/lib/python3.7/site-packages/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
    return self.main()
  File "/usr/lib/python3.7/site-packages/npyscreen/apNPSApplicationManaged.py", line 172, in main
    self._THISFORM.edit()
  File "/usr/lib/python3.7/site-packages/npyscreen/fm_form_edit_loop.py", line 86, in edit
    self._widgets__[self.editw].edit()
  File "/usr/lib/python3.7/site-packages/npyscreen/wgmultiline.py", line 581, in edit
    self.get_and_use_key_press()
  File "/usr/lib/python3.7/site-packages/npyscreen/wgwidget.py", line 564, in get_and_use_key_press
    return self.try_while_waiting()
  File "/usr/lib/python3.7/site-packages/npyscreen/wgwidget.py", line 549, in try_while_waiting
    self.parent.parentApp._internal_while_waiting()
  File "/usr/lib/python3.7/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 "/usr/lib/python3.7/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
jwoglom commented 5 years ago

I ran into this issue as well -- it's an incompatibility issue between npyscreen and python 3.7 due to a change in 3.7 onward: https://www.python.org/dev/peps/pep-0479/

You can try using this fork of npyscreen which should work around this behavior: https://github.com/jwoglom/npyscreen

I haven't updated the requirements.txt to reference this repo because I haven't been able to fully test it end-to-end on my machine. (I switched to macOS and there are a number of compatibility problems involving dbus and signal-cli which I haven't fully figured out yet.) If this works for you, I'll commit this or you can make another pull request (saw your first PR with the syntax changes in requirements.txt).

alxjsn commented 5 years ago

That fixed the issue. Thanks!