coderholic / pyradio

Curses based internet radio player
www.coderholic.com/pyradio
MIT License
958 stars 129 forks source link

[BUG] PyRadio does not work on GhostBSD 24.07.3 Mate #259

Open sestarus13 opened 22 hours ago

sestarus13 commented 22 hours ago

Describe the bug A clear and concise description of what the bug is.

PyRadio does not work. It thorws an exception and abort itself.

To Reproduce Steps to reproduce the behavior:

  1. Press Install GhostBSD from the subject, open terminal window, type pyradio, press enter.
  2. There is a welcome message attached and after you press any key, program crashes.
  3. It asks a question: AttributeError: module 'curses' has no attribute 'KEY_RESIZE'. Did you mean: 'KEY_RESUME'?
  4. What ever you select or type it crashes instead of playing music
  5. See error bellow

Expected behavior A clear and concise description of what you expected to happen.

It should allow you to choose a station, press enter to select, it shoudl play Music

System (please complete the following information):

Additional context Add any other context about the problem here.

Console output:

p@p-ghostbsd ~/Desktop> pyradio
Reading playlist...
 PyRadio 0.9.3.11                         https://github.com/coderholic/pyradio
┌─────────────────────────────────[stations]───────────────────────────────────┐
│ 1. Alternative (BAGeL Radio)                                                 │
│ 2. Alternative (The Alternative Project)                                     │
│ 3. American Roots (Boot Liquor - SomaFM)                                     │
│ 4. Celtic (ThistleRadio - SomaFM)                                            │
│ 5.┌───────────────────────── Themes Disabled ────────────────────────────┐   │
│ 6.│ Curses (the library this program is based on), will not display      │   │
│ 7.│ colors correctly in this terminal, (after they have been changed by  │   │
│ 8.│ PyRadio.                                                             │   │
│ 9.│                                                                      │   │
│10.│ Therefore, using themes is disabled and the default theme is used.   │   │
│11.│                                                                      │   │
│12.│ For more info, please refer to:                                      │   │
│13.│ https://github.com/coderholic/pyradio/#virtual-terminal-restrictions │   │
│14.│                                                                      │   │
│15.│ Press "x" to never display this message in the future, or            │   │
│16.└──────────────────────────────────────────────────── Press any key... ┘   │
│17. House (Beat Blender - SomaFM)                                             │
│18. Indie Pop (Indie Pop Rocks! - SomaFM)                                     │
│19. Intelligent dance music (Cliq Hop - SomaFM)                               │
│20. Jazz (Sonic Universe - SomaFM)                                            │
└──────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "/usr/local/bin/pyradio", line 8, in <module>
    sys.exit(shell())
             ^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyradio/main.py", line 941, in shell
    curses.wrapper(pyradio.setup)
  File "/usr/local/lib/python3.11/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyradio/radio.py", line 1119, in setup
    self.run()
  File "/usr/local/lib/python3.11/site-packages/pyradio/radio.py", line 2000, in run
    ret = self.keypress(c)
          ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyradio/radio.py", line 6039, in keypress
    if char in (curses.KEY_RESIZE, ):
                ^^^^^^^^^^^^^^^^^
AttributeError: module 'curses' has no attribute 'KEY_RESIZE'. Did you mean: 'KEY_RESUME'?
p@p-ghostbsd ~/Desktop [1]> 
s-n-g commented 19 hours ago

This seems to be a FreeBSD problem; I have found this bug report

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280697

It seems to have to do with the way curses is built, or something; a patch is also provided and tested...

pyradio is not the only program affected: fileobj and ranger is also affected, I believe all curses programs will

So, there's nothing I can do about it until it is fixed upstream, I'm afraid