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

Fails on linux, no afplay #5

Open
0xf0xx0 opened this issue Feb 4, 2022 · 1 comment · May be fixed by #6
Open

Fails on linux, no afplay #5

0xf0xx0 opened this issue Feb 4, 2022 · 1 comment · May be fixed by #6

Comments

@0xf0xx0
Copy link

0xf0xx0 commented Feb 4, 2022

Error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/gingka/Builds/audius-terminal-player/src/__main__.py", line 4, in <module>
    main()
  File "/home/gingka/Builds/audius-terminal-player/src/__init__.py", line 5, in main
    Player()
  File "/home/gingka/Builds/audius-terminal-player/src/tui/Player.py", line 121, in __init__
    self.render()
  File "/home/gingka/Builds/audius-terminal-player/src/tui/Player.py", line 158, in render
    self.root.start()
  File "/home/gingka/.local/lib/python3.10/site-packages/py_cui/__init__.py", line 316, in start
    curses.wrapper(self._draw)
  File "/usr/lib/python3.10/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/gingka/.local/lib/python3.10/site-packages/py_cui/__init__.py", line 1684, in _draw
    self._handle_key_presses(key_pressed)
  File "/home/gingka/.local/lib/python3.10/site-packages/py_cui/__init__.py", line 1561, in _handle_key_presses
    selected_widget._handle_key_press(key_pressed)
  File "/home/gingka/.local/lib/python3.10/site-packages/py_cui/widgets.py", line 510, in _handle_key_press
    Widget._handle_key_press(self, key_pressed)
  File "/home/gingka/.local/lib/python3.10/site-packages/py_cui/widgets.py", line 342, in _handle_key_press
    command()
  File "/home/gingka/Builds/audius-terminal-player/src/tui/components/Table.py", line 83, in handle_select
    self.select_callback(selection)
  File "/home/gingka/Builds/audius-terminal-player/src/tui/Player.py", line 267, in play_track
    playback.stream(self.current_track.id)
  File "/home/gingka/Builds/audius-terminal-player/src/libs/playback.py", line 10, in stream
    subprocess.Popen(["afplay", local_filepath])
  File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'afplay'

System info:

  • OS: EndeavourOS Rolling
  • Python version: 3.10.2
@0xf0xx0 0xf0xx0 linked a pull request Feb 4, 2022 that will close this issue
@kerkkoh
Copy link

kerkkoh commented Feb 5, 2022

This seems to only support Mac OS (as it uses the afplay command for Mac OS), which seems funny because something like this could easily use for example the playsound library for python to offer playback on all operating systems.

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

Successfully merging a pull request may close this issue.

2 participants