deadbeef module does not work because there is a return missing in _get_deadbeef_data in front of the self.py3.command_output call.
Is there an error message?
Sure, the obvious one: None has no attr split...
'NoneType' object has no attribute 'split' (AttributeError) deadbeef.py line 120.
Traceback
AttributeError: 'NoneType' object has no attribute 'split'
File "/usr/lib/python3.7/site-packages/py3status/module.py", line 799, in run
response = method()
File "/usr/lib/python3.7/site-packages/py3status/modules/deadbeef.py", line 120, in deadbeef
beef_data = dict(zip(self.placeholders, line.split(self.separator)))
... as function deadbeef calls
line = self._get_deadbeef_data()
and then processes line. As _get_deadbeef_data does return None if the call to the deadbeef cli does NOT fail, you never get any output to parse.
I think it may return a non zero code
None would give an attribute error I'd imagine
What do you mean by that? It returns nothing if it succeeds and the calling function tries to parse that nothing, so it's obviously wrong...
And it works if I add the return, see:
ograf@xlad ~$ python /usr/lib/python3.7/site-packages/py3status/modules/deadbeef.py
{'full_text': 'Gamma Ray - Gods Of Deliverance', 'color': '#00FF00', 'cached_until': 1542902257.0}
{'full_text': 'Gamma Ray - Gods Of Deliverance', 'color': '#00FF00', 'cached_until': 1542902258.0}
@tobes Not anymore, it seems like. Should I just take it out or leave it there for older distributions?
Should I just take it out or leave it there for older distributions?
no need to just break things for users, but there should be comments as to why it is like this
@lydon42 Can you test #1581? We used error output so there was no need to assign it to anything because it would fail in the past. Improving Deadbeef (obviously) broke our module.
Yes, that fixes the problem.
And thanks for the super fast response :)
Thanks for the bug report. :-)