rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
554 stars 24 forks source link

Crash after setting a priority on a list of file #158

Closed lenormf closed 4 years ago

lenormf commented 4 years ago

Hi,

I tagged several files in a torrent, hit f0 then this happened:

    load_entry_point('stig==0.11.0a0', 'console_scripts', 'stig')()
  File "/usr/lib/python3.8/site-packages/stig/__init__.py", line 25, in run
    main.run()
  File "/usr/lib/python3.8/site-packages/stig/main.py", line 102, in run
    if not tui.run(run_commands):
  File "/usr/lib/python3.8/site-packages/stig/tui/main.py", line 60, in run
    tuiobjects.urwidloop.run()
  File "/usr/lib/python3.8/site-packages/urwid/main_loop.py", line 287, in run
    self._run()
  File "/usr/lib/python3.8/site-packages/urwid/main_loop.py", line 385, in _run
    self.event_loop.run()
  File "/usr/lib/python3.8/site-packages/stig/tui/urwidpatches.py", line 175, in run
    raise self._exc_info
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdmanager.py", line 217, in run_async
    await process.wait_async()
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 204, in wait_async
    self._finish(exception=e)
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 178, in _finish
    raise exception
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 202, in wait_async
    await self._task
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 154, in <lambda>
    self._task.add_done_callback(lambda task: self._catch_exceptions(task.result))
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 164, in _catch_exceptions
    self._finish(exception=e)
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 178, in _finish
    raise exception
  File "/usr/lib/python3.8/site-packages/stig/commands/cmdbase.py", line 162, in _catch_exceptions
    callabee(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/stig/commands/base/file.py", line 151, in run
    response = await self.make_request(
  File "/usr/lib/python3.8/site-packages/stig/commands/tui/_mixin.py", line 44, in make_request
    response = await request_coro
  File "/usr/lib/python3.8/site-packages/stig/client/aiotransmission/api_torrent.py", line 781, in file_priority
    for t in humansort(response.torrents, key=lambda t: t['name']):
NameError: name 'humansort' is not defined
lenormf commented 4 years ago

Seems to be a typo, humansorthumansorted.

rndusr commented 4 years ago

Indeed. Thanks.