Skip to content

[BUG] Pressing < or > results in UnboundLocalError. #289

@amano-kenji

Description

@amano-kenji

Describe the bug

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.13/pyradio", line 8, in <module>
    sys.exit(shell())
             ~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyradio/main.py", line 986, in shell
    curses.wrapper(pyradio.setup)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python3.13/site-packages/pyradio/radio.py", line 1310, in setup
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyradio/radio.py", line 2292, in run
    ret = self.keypress(c)  # Handle shortcut
  File "/usr/lib/python3.13/site-packages/pyradio/radio.py", line 9672, in keypress
    self._local_functions[char]()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyradio/radio.py", line 6400, in _stations_history_previous
    self._cnf.stations_history.play_previous()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyradio/config.py", line 3541, in play_previous
    self.pass_first_item_func()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyradio/radio.py", line 10537, in _show_first_station_history_notification
    self._show_delayed_notification('___' + msg + '___')
                                            ^^^
UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value

To Reproduce

  1. Press < or >

System (please complete the following information):

  • OS: Gentoo Linux
  • Python version: 3.13
  • PyRadio Version: 0.9.3.11.12
  • Player used: mpv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions