with this command i get my actually choicen input from my yamaha avr.

sudo /root/programme/yamaha/yamaha.py INP ?| awk {'print $2'} | sed \"s/'//g\" | sed \"s/}//\" | sed \"s/ /-/\"

but sometimes it returns an empty string and when this happens i get this error:

error [pimatic-shell-execute]:

does anyone know how to fix that ? when i test it in command line all wokrs fine, but from ten times i tested it, i get one time an empty line.