Opened 5 months ago

Closed 5 months ago

#25801 closed defect (fixed)

Unhandled exceptions in nyx

Reported by: cypherpunks Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Running nyx 2.0.4 from FreeBSD repository, after going to the 'Connections' page which can be empty (AFAIK it depends on tor configuration), pressing a button which would normally lead to some useful information (eg 'd' or 'e') results in an unhandled exception and shuts nyx down.

Key 'd' fails with:

Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 11, in <module>
    load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
  File "/usr/local/lib/python2.7/site-packages/nyx/__init__.py", line 176, in main
    nyx.starter.main()
  File "/usr/local/lib/python2.7/site-packages/stem/util/conf.py", line 289, in wrapped
    return func(*args, config = config, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/nyx/starter.py", line 118, in main
    nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
  File "/usr/local/lib/python2.7/site-packages/nyx/curses.py", line 217, in start
    curses.wrapper(_wrapper)
  File "/usr/local/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/site-packages/nyx/curses.py", line 215, in _wrapper
    function()
  File "/usr/local/lib/python2.7/site-packages/nyx/__init__.py", line 243, in draw_loop
    keybinding.handle(key)
  File "/usr/local/lib/python2.7/site-packages/nyx/panel/__init__.py", line 84, in handle
    self._action()
  File "/usr/local/lib/python2.7/site-packages/nyx/panel/connection.py", line 367, in _show_descriptor
    color = CONFIG['attr.connection.category_color'].get(selected.entry.get_type(), WHITE)
AttributeError: 'tuple' object has no attribute 'entry'

Key 'e' fails with:

Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 11, in <module>
    load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
  File "/usr/local/lib/python2.7/site-packages/nyx/__init__.py", line 176, in main
    nyx.starter.main()
  File "/usr/local/lib/python2.7/site-packages/stem/util/conf.py", line 289, in wrapped
    return func(*args, config = config, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/nyx/starter.py", line 118, in main
    nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
  File "/usr/local/lib/python2.7/site-packages/nyx/curses.py", line 217, in start
    curses.wrapper(_wrapper)
  File "/usr/local/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/site-packages/nyx/curses.py", line 215, in _wrapper
    function()
  File "/usr/local/lib/python2.7/site-packages/nyx/__init__.py", line 243, in draw_loop
    keybinding.handle(key)
  File "/usr/local/lib/python2.7/site-packages/nyx/panel/__init__.py", line 84, in handle
    self._action()
  File "/usr/local/lib/python2.7/site-packages/nyx/panel/connection.py", line 394, in _show_exiting_port_usage
    key_width = max(map(len, self._exit_port_usage.keys()))
ValueError: max() arg is an empty sequence

Child Tickets

Change History (2)

comment:1 Changed 5 months ago by cypherpunks

Component: - Select a componentCore Tor/Nyx
Owner: set to atagar
Summary: Unhandled exceptionsUnhandled exceptions in nyx
Version: Tor: unspecified

comment:2 Changed 5 months ago by atagar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.