surekap / MMM-ShairportMetadata

AirTunes metadata module for MagicMirror
MIT License
18 stars 11 forks source link

somebody is now playing #18

Open johnway94 opened 1 year ago

johnway94 commented 1 year ago

hi, i am having trouble displaying the metadata. when i run shairport-sync-metadata-reader < /tmp/shairport-sync-metadata command it displays correct metadata and updates fine. so i assume shairport is working correctly. i have git cloned your repo into the module folder and altered both config files. but still will not display the song details. when running magic mirror npm run start i get a error

[LOG] ERR: File "/home/pi/MagicMirror/modules/MMM-ShairportMetadata/shairport-metadata.py", line 86 print json.dumps({}) ^ SyntaxError: invalid syntax

i noticed json links to cpython ? do i need to install cython ?

i have checked and i cant find any syntax errors . i am pretty new to code. could it be something to do with python2 or python 3 ? am i missing something. thanks in advance

johnway94 commented 1 year ago

i have fixed the problem. the script was running in python 3. I simply installed python2 and added the line #!/usr/bin/python at the top of the script to run it in python2.