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

TypeError when Selecting a Contact #20

Open
heywoodlh opened this issue Apr 10, 2020 · 2 comments
Open

TypeError when Selecting a Contact #20

heywoodlh opened this issue Apr 10, 2020 · 2 comments

Comments

@heywoodlh
Copy link

Unable to select contacts. Seems that len(contacts) is returning NoneType rather than int.

Here is the traceback:

Traceback (most recent call last):
  File "/opt/signal-curses/main.py", line 37, in <module>
    scurses.launcher.run(args)
  File "/opt/signal-curses/scurses/launcher/__init__.py", line 30, in run
    signal.run()
  File "/usr/lib/python3.8/site-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/usr/lib/python3.8/site-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/usr/lib/python3.8/site-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
    return_code = call_function(_SCREEN)    
  File "/usr/lib/python3.8/site-packages/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
    return self.main()
  File "/usr/lib/python3.8/site-packages/npyscreen/apNPSApplicationManaged.py", line 174, in main
    self._THISFORM.afterEditing()
  File "/opt/signal-curses/scurses/__init__.py", line 186, in afterEditing
    selected, is_group = self.getFromId(self.tree.value)
  File "/opt/signal-curses/scurses/__init__.py", line 180, in getFromId
    is_group = (tree_id > len(contacts) + 2)
TypeError: '>' not supported between instances of 'NoneType' and 'int'
@jwoglom
Copy link
Owner

jwoglom commented Apr 11, 2020

There are some problems currently with loading contacts from signal-cli -- it doesn't seem to pre-populate the contacts list anymore in the config file -- which are likely causing this issue

@heywoodlh
Copy link
Author

Cool. Since you are aware of the issue do you have any plans to fix it? If not, is there any way I could help?

From looking around the codebase briefly, it seems that most of the contacts related stuff (and other GUI stuff) is in scurses/__init__.py. With a little guidance I wouldn't mind contributing if I'm able to figure stuff out.

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