Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amano-kenji opened this issue May 19, 2025 · 1 comment
Closed

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

amano-kenji opened this issue May 19, 2025 · 1 comment

Comments

@amano-kenji
Copy link

amano-kenji commented May 19, 2025

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
@amano-kenji amano-kenji changed the title [BUG] [BUG] Pressing '<' or '>' results in UnboundLocalError. May 19, 2025
@amano-kenji amano-kenji changed the title [BUG] Pressing '<' or '>' results in UnboundLocalError. [BUG] Pressing < or > results in UnboundLocalError. May 19, 2025
s-n-g added a commit that referenced this issue May 19, 2025
- fixing #289 - sing < or > results in UnboundLocalError
s-n-g added a commit that referenced this issue May 19, 2025
- fixing #289 - sing < or > results in UnboundLocalError
- updating MPV download link for Windows
@s-n-g
Copy link
Collaborator

s-n-g commented May 19, 2025

Fixed in 0.9.11.13

@s-n-g s-n-g closed this as completed May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants