Skip to content
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

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

Closed
sestarus13 opened this issue Oct 22, 2024 · 3 comments
Closed

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

sestarus13 opened this issue Oct 22, 2024 · 3 comments

Comments

@sestarus13
Copy link

sestarus13 commented Oct 22, 2024

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):

  • OS: [e.g. Dabian, macOS, Windows] GhostBSD 24.07.03
  • Python version: Python 3.11.10
  • pipx version (if applicable): Not Installed
  • pipx installation method: System dependent / Fully isolated
  • PyRadio Version: 0.9.3.11
  • Player used: [e.g mpv, mplayer, vlc] mpv,

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
Copy link
Collaborator

s-n-g commented Oct 22, 2024

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

@sestarus13
Copy link
Author

sestarus13 commented Oct 28, 2024 via email

@s-n-g
Copy link
Collaborator

s-n-g commented Oct 28, 2024

I know that you can use ports to manually install/build packages on freebsd, but I am not savvy enough to provide guidance about it..

https://en.wikipedia.org/wiki/FreeBSD_Ports

https://ports.freebsd.org/cgi/ports.cgi

Maybe it'd be better to ask for help in the freebsd / ghostbsd forums...

BTW, I have success running pyradio on a freshly installed freebsd, so... maybe the problem has already been fixed?

Screenshot_2024-10-28_11-20-05

I have tried after updating ghostbsd, but the problem is still there...

Anyhow, I am closing this issue since it is not pyradio specific...

@s-n-g s-n-g closed this as completed Oct 28, 2024
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