cykerway/ncmpy

Unable to start

Closed this issue · 2 comments

ENV:

Python 3.7.2-3
MPD 0.21.4-1
Arch Linux

Installed ncmpy & python-mpd2 with pip install --user ncmpy

Thanks for sharing this tool, the description sounds great. I am currently unable to get it to start, here is what I am seeing. Any pointers would be appreciated.

Traceback (most recent call last):
  File "/home/clu/.local/bin/ncmpy", line 11, in <module>
    load_entry_point('ncmpy==1.5.4', 'console_scripts', 'ncmpy')()
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/__main__.py", line 505, in main
    return wrapper(_main)
  File "/usr/lib/python3.7/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/__main__.py", line 497, in _main
    Ncmpy(stdscr).main_loop()
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/__main__.py", line 210, in __init__
    self.on_event('timeout')
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/__main__.py", line 448, in on_event
    self.update()
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/__main__.py", line 376, in update
    pane.update()
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/pane.py", line 333, in update
    self.win.insstr(0, 0, self.build_menu_str())
  File "/home/clu/.local/lib/python3.7/site-packages/ncmpy/pane.py", line 324, in build_menu_str
    vol = 'Volume: {:3d}%'.format(int(self.status['volume']))
KeyError: 'volume'

The problem looks like server status doesn't contain volume information.

First, make sure your mpd is started and mpc play plays something. If still not working, downgrade to mpd 0.20 and try again. To debug this, you could add this line to print server status:

print(self.status)

on line 324 of pane.py. self.status is a dict containing server status. Post it here if you can so that I can see what the server replies.

After checking mpc status i noticed the volume was "n/a". Specifying

mixer_type "software"

for the audio_ouput in my mpd.conf allowed ncmpy to start. Forgive me, as I have not used anything mpd based in a few years so I am rusty :/

Thanks for prompt reply and help.