Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #28332

Closed
Open
Opened Nov 05, 2018 by Trac@tracbot

Nyx configurashion editor reproducibly crashes if custom ordering is set

Nyx 2.0.4 at Linux. How to reproduce:

  1. Go to configuration editor.
  2. Press s and select the following order: Is Set, Name, Description.
  3. "Toggle filtering" by pressing a.
  4. Nyx immediately crashes with the following log:
Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 9, in <module>
    load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()
  File "/usr/local/lib/python3.4/dist-packages/nyx/__init__.py", line 176, in main
    nyx.starter.main()
  File "/usr/local/lib/python3.4/dist-packages/stem/util/conf.py", line 289, in wrapped
    return func(*args, config = config, **kwargs)
  File "/usr/local/lib/python3.4/dist-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/python3.4/dist-packages/nyx/curses.py", line 217, in start
    curses.wrapper(_wrapper)
  File "/usr/lib/python3.4/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.4/dist-packages/nyx/curses.py", line 215, in _wrapper
    function()
  File "/usr/local/lib/python3.4/dist-packages/nyx/__init__.py", line 243, in draw_loop
    keybinding.handle(key)
  File "/usr/local/lib/python3.4/dist-packages/nyx/panel/__init__.py", line 84, in handle
    self._action()
  File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 258, in _toggle_show_all
    self._sort_content()
  File "/usr/local/lib/python3.4/dist-packages/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 "/usr/local/lib/python3.4/dist-packages/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 "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 325, in <listcomp>
    self._all_content = sorted(self._all_content, key = lambda entry: [entry.sort_value(field) for field in self._sort_order])
  File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 128, in sort_value
    return self.description
  File "/usr/local/lib/python3.4/dist-packages/nyx/panel/config.py", line 148, in description
    return getattr(manual(self.name), 'description')
AttributeError: 'NoneType' object has no attribute 'description'

I guess it would also crash with many other types of ordering.

Trac:
Username: wagon

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#28332