[tor-bugs] #28604 [Applications]: nyx dies with python errors when sorting on the configuration page

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 23 20:06:19 UTC 2018


#28604: nyx dies with python errors when sorting on the configuration page
--------------------------+------------------------------
 Reporter:  torix         |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Component:  Applications
  Version:  Tor: 0.3.3.9  |       Severity:  Normal
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------
 Created this by:
 running nyx 2.04 by sudoing to root (only way that works for me)
 2 right arrows to get to config page
 S to sort, Enter,Enter, Enter (Name, Value, Value Type)
 ------
 [[6~Traceback (most recent call last):
   File "/usr/local/bin/nyx", line 14, in <module>
     nyx.main()
   File "/root/nyx/nyx/nyx/__init__.py", line 176, in main
     nyx.starter.main()
   File "/root/nyx/nyx/stem/util/conf.py", line 289, in wrapped
     return func(*args, config = config, **kwargs)
   File "/root/nyx/nyx/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 "/root/nyx/nyx/nyx/curses.py", line 217, in start
     curses.wrapper(_wrapper)
   File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
     return func(stdscr, *args, **kwds)
   File "/root/nyx/nyx/nyx/curses.py", line 215, in _wrapper
     function()
   File "/root/nyx/nyx/nyx/__init__.py", line 243, in draw_loop
     keybinding.handle(key)
   File "/root/nyx/nyx/nyx/panel/__init__.py", line 82, in handle
     self._action(key)
   File "/root/nyx/nyx/nyx/panel/config.py", line 232, in _scroll
     self.redraw()
   File "/root/nyx/nyx/nyx/panel/__init__.py", line 175, in redraw
     self._last_draw_size = nyx.curses.draw(self._draw, top = self._top,
 height = self.get_height(), draw_if_resized = draw_dimension)
   File "/root/nyx/nyx/nyx/curses.py", line 746, in draw
     func(_Subwindow(subwindow_width, subwindow_height, curses_subwindow))
   File "/root/nyx/nyx/nyx/panel/config.py", line 315, in _draw
     _draw_line(subwindow, scroll_offset, DETAILS_HEIGHT + i, entry, entry
 == selected, value_width, description_width)
   File "/root/nyx/nyx/nyx/panel/config.py", line 335, in _draw_line
     attr = [CONFIG['attr.config.category_color'].get(entry.category,
 WHITE)]
   File "/root/nyx/nyx/nyx/panel/config.py", line 136, in category
     return getattr(manual(self.name), 'category')
 AttributeError: 'NoneType' object has no attribute 'category'
 ---


 ANOTHER EXAMPLE:
 a to get all configuration options shown
 S to sort, Name, Summary, Description
 --------

 Traceback (most recent call last):
   File "/usr/local/bin/nyx", line 14, in <module>
     nyx.main()
   File "/root/nyx/nyx/nyx/__init__.py", line 176, in main
     nyx.starter.main()
   File "/root/nyx/nyx/stem/util/conf.py", line 289, in wrapped
     return func(*args, config = config, **kwargs)
   File "/root/nyx/nyx/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 "/root/nyx/nyx/nyx/curses.py", line 217, in start
     curses.wrapper(_wrapper)
   File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
     return func(stdscr, *args, **kwds)
   File "/root/nyx/nyx/nyx/curses.py", line 215, in _wrapper
     function()
   File "/root/nyx/nyx/nyx/__init__.py", line 243, in draw_loop
     keybinding.handle(key)
   File "/root/nyx/nyx/nyx/panel/__init__.py", line 84, in handle
     self._action()
   File "/root/nyx/nyx/nyx/panel/config.py", line 207, in _show_sort_dialog
     self._sort_content()
   File "/root/nyx/nyx/nyx/panel/config.py", line 325, in _sort_content
     self._all_content = sorted(self._all_content, key = lambda entry:
 [entry.sort_value(field) for field in self._sort_order])
   File "/root/nyx/nyx/nyx/panel/config.py", line 325, in <lambda>
     self._all_content = sorted(self._all_content, key = lambda entry:
 [entry.sort_value(field) for field in self._sort_order])
   File "/root/nyx/nyx/nyx/panel/config.py", line 126, in sort_value
     return self.summary
   File "/root/nyx/nyx/nyx/panel/config.py", line 144, in summary
     return getattr(manual(self.name), 'summary')
 AttributeError: 'NoneType' object has no attribute 'summary'

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28604>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list