signal-curses icon indicating copy to clipboard operation
signal-curses copied to clipboard

ImportError: No module named 'npyscreen'

Open BurtGummer opened this issue 5 years ago • 7 comments

Hello,

i try to install this client, but:

root@sa /opt/signal/signal-curses-master # pip install -r requirements.txt
Collecting npyscreen (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/93/48/91b8321280f17d135918895b57f891f727be84a88f62fc62485a7039de00/npyscreen-4.10.5.tar.gz (94kB)
    100% |████████████████████████████████| 102kB 4.2MB/s
Collecting pydbus (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/92/56/27148014c2f85ce70332f18612f921f682395c7d4e91ec103783be4fce00/pydbus-0.6.0-py2.py3-none-any.whl
Collecting pyqrcode (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/37/61/f07226075c347897937d4086ef8e55f0a62ae535e28069884ac68d979316/PyQRCode-1.2.1.tar.gz
Building wheels for collected packages: npyscreen, pyqrcode
  Running setup.py bdist_wheel for npyscreen ... done
  Stored in directory: /root/.cache/pip/wheels/84/5e/03/f8749addcb3fe1ead4f3204a77b63419bda50bd760fea0bb35
  Running setup.py bdist_wheel for pyqrcode ... done
  Stored in directory: /root/.cache/pip/wheels/54/61/2f/a4f51b09473db5737db0f654ed10eb9a4ee01f83a7412de349
Successfully built npyscreen pyqrcode
Installing collected packages: npyscreen, pydbus, pyqrcode
Successfully installed npyscreen-4.10.5 pydbus-0.6.0 pyqrcode-1.2.1
root@sa /opt/signal/signal-curses-master # python3 main.py -u '+490000000000'
Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import npyscreen
ImportError: No module named 'npyscreen'
root@sa /opt/signal/signal-curses-master # ls
main.py  README.md  requirements.txt  screenshots
root@sa /opt/signal/signal-curses-master #

Running on Debian 9.5. Any ideas whats wrong?

BurtGummer avatar Nov 06 '18 05:11 BurtGummer

This might not be the actual problem, but is pip referring to your python2 or python3 install? On debian you likely need to specify pip3 explicitly.

jwoglom avatar Nov 06 '18 06:11 jwoglom

Hello jwoglom,

thank you, your right! But now i got:

root@sa /opt/signal/signal-curses-master # pip3 install -r requirements.txt
Collecting npyscreen (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/93/48/91b8321280f17d135918895b57f891f727be84a88f62fc62485a7039de00/npyscreen-4.10.5.tar.gz
Requirement already satisfied: pydbus in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2))
Collecting pyqrcode (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/37/61/f07226075c347897937d4086ef8e55f0a62ae535e28069884ac68d979316/PyQRCode-1.2.1.tar.gz
Building wheels for collected packages: npyscreen, pyqrcode
  Running setup.py bdist_wheel for npyscreen ... done
  Stored in directory: /root/.cache/pip/wheels/84/5e/03/f8749addcb3fe1ead4f3204a77b63419bda50bd760fea0bb35
  Running setup.py bdist_wheel for pyqrcode ... done
  Stored in directory: /root/.cache/pip/wheels/54/61/2f/a4f51b09473db5737db0f654ed10eb9a4ee01f83a7412de349
Successfully built npyscreen pyqrcode
Installing collected packages: npyscreen, pyqrcode
Successfully installed npyscreen-4.10.5 pyqrcode-1.2.1
root@sa /opt/signal/signal-curses-master # python3 main.py -u '+4910000000'
Traceback (most recent call last):
  File "main.py", line 998, in <module>
    signal.run()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
    return_code = call_function(_SCREEN)
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
    return self.main()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/apNPSApplicationManaged.py", line 172, in main
    self._THISFORM.edit()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/fm_form_edit_loop.py", line 86, in edit
    self._widgets__[self.editw].edit()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/wgmultiline.py", line 581, in edit
    self.get_and_use_key_press()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/wgwidget.py", line 573, in get_and_use_key_press
    ch = self._get_ch()
  File "/usr/local/lib/python3.5/dist-packages/npyscreen/wgwidget.py", line 501, in _get_ch
    ch = self.parent.curses_pad.getch()
  File "main.py", line 487, in sigint_handler
    self.handleExit()
  File "main.py", line 482, in handleExit
    self.killDaemon()
  File "main.py", line 478, in killDaemon
    self.daemonPopen.send_signal(SIGINT)
AttributeError: 'NoneType' object has no attribute 'send_signal'
root@sa /opt/signal/signal-curses-master #

Any idea?

BurtGummer avatar Nov 06 '18 08:11 BurtGummer

Make sure you've installed all of the dependencies referenced in the readme: https://github.com/jwoglom/signal-curses/blob/master/README.md

jwoglom avatar Nov 06 '18 15:11 jwoglom

I could help bundle this into a setuptools ready distribution, if you would accept a PR to that effect.

rpdelaney avatar Nov 08 '18 22:11 rpdelaney

@rpdelaney feel free to make a PR -- I haven't had a chance to work on this project in a little while so contributions are welcome.

jwoglom avatar Nov 09 '18 02:11 jwoglom

@jwoglom I shot you an email -- this needs a license.

rpdelaney avatar Nov 12 '18 00:11 rpdelaney

per latest commit signal-curses is licensed GPL3 @rpdelaney

jwoglom avatar Nov 12 '18 00:11 jwoglom