Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Issue with MPD python library after Moode update
#1
Hi all,
here's my first post after severl months of abscence. This morning I updated my system (RPi3 based) to the last Moode Version (I had version 7.0 before). 
I have a python script continuosly running getting info from MPD , to print on an OLED 16x2 display the info related to the currenly playing track.
I try to run from the command line the python script, but the infamous "No module named mpd" message appears.

(In the code , the line is simply "from mpd import MPDClient".)

Then I try to install the missing library (as done anytime in the past I made a re-installation from scratch of Moode), but without success.
I tried:
1) sudo apt-get install python-mpd
2) sudo apt-get install python-mpd2
3) sudo pip install python-mpd
4) sudo pip install python-mpd2

No one of the above ones works. Any ideas? I tried also to make a simple "sudo apt-get install update" then "sudo apt-get install upgrade", but with non success.
Any idea?

thanks in advance, and Happy New Year to all the forum participants

Andrea (from Italy, apologize for bad english)
Reply
#2
@mancio61

Choice #4 works here in Maryland

Code:
pi@rpi4b:~ $ sudo pip install python-mpd2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting python-mpd2
 Downloading https://files.pythonhosted.org/packages/f4/95/8f1230e533761a55ffea7c76317c766d3fc8f57f1763ab94dac8e448a901/python_mpd2-1.1.0-py2.py3-none-any.whl
Installing collected packages: python-mpd2
Successfully installed python-mpd2-1.1.0

(note that host rpi4b is a moOde 7.6.1 player)

As an aside, note that Python 2 is still the default because moOde 7.6.1 is based on RaspiOS/Debian Buster.

Code:
pi@rpi4b:~ $ python -V
Python 2.7.16

This will change with the move to RaspiOS/Debian Bullseye for moOde 8.

ETA: If one runs pip3 instead, one gets a module with the same name and different version number

Code:
pi@rpi4b:~ $ sudo pip3 install python-mpd2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting python-mpd2
 Downloading https://files.pythonhosted.org/packages/09/bc/d9cf9751320686b6686ff241f8017c4c516c4d2e681702847eb404aea946/python_mpd2-3.0.4-py2.py3-none-any.whl
Installing collected packages: python-mpd2
Successfully installed python-mpd2-3.0.4

You'll have to work out what you want.

Regards,
Kent
Reply
#3
Hi Kent, I try all but it fails. 
I have a suspect to have a network issue. Even the radio (going onto the Internet) don't play at all.
Neither a simple "sudo apt-get update"... it fails with the message "couldn't resolve 'archive-raspberrypi.org'

the system is perfectly see inside my LAN (e.g. I'm able to play music get from my NAS), but seems to be have issue to go out in the Internet.
Before the update to last Moode version it worked perfectly.

I'm not a Linux expert, so what I can do to check and fix this issue ?

thanks !
Andrea
Reply
#4
ok, I've solved. It was a problem on the router. In the past I had a reserved IP address for the system having a different hostname (it was "moode-streamer). The system after the upgrade , got the default name "moode", it connects with the same IP address and probably I've got conflict at the router level. 
I remove the reservatio, create the new one, restarted the router and now all it works !

thanks anyway
Reply
#5
(01-15-2022, 04:54 PM)mancio61 Wrote: ok, I've solved. It was a problem on the router. In the past I had a reserved IP address for the system having a different hostname (it was "moode-streamer). The system after the upgrade , got the default name "moode", it connects with the same IP address and probably I've got conflict at the router level. 
I remove the reservatio, create the new one, restarted the router and now all it works !

thanks anyway

Nice!
Reply


Forum Jump: