drgerg / mmc4w

Minimal MPD Client for Windows - No-Cloud, Local Music Library
GNU General Public License v3.0
8 stars 2 forks source link

No module named 'musicpd' & cannot import name 'ImageTk' #24

Closed donburch888 closed 2 months ago

donburch888 commented 2 months ago

Hi, I'm looking for a simple MPD user interface - basically a set of buttons to activate pre-selected playlists and radio stations - for my elderly non-technical partner to use on the Raspberry Pi with 7" touchscreen in the kitchen ... and mmc4w comes closest and seems under current support.
Frankly, all the other musc players seem designed for audiophiles to scroll through lists of artists and albums to select what to play next :-(

I worked as a programmer, but new to python, and I expect to modify code to fit the 7" screen and other requirements.

Cloning your code and running it I get

pi@KitchenPlayer:~/mmc4w/code $ python mmc4w.py
Traceback (most recent call last):
  File "/home/pi/mmc4w/code/mmc4w.py", line 18, in <module>
    import musicpd
ModuleNotFoundError: No module named 'musicpd'

Ah, I see in the comment that you have used python-musicpd, so installed that

and on to the next error message ...

Traceback (most recent call last):
  File "/home/pi/mmc4w/code/mmc4w.py", line 20, in <module>
    from PIL import ImageTk, Image
ImportError: cannot import name 'ImageTk' from 'PIL' (/usr/lib/python3/dist-packages/PIL/__init__.py)

A quick search suggests that pillow long ago superceeded PIL

But my big question is ... are these the packages you are using, and more importantly, which versions are you using ?

drgerg commented 2 months ago

I sent you an email response that was rather verbose.

After digging a bit, the short answer is:

Package               Version
--------------------- ------------------------------------
python-musicpd        0.8.0
Pillow                9.5.0

Hope that helps.

donburch888 commented 2 months ago

Thanks for your information. Both are recent versions ... not always the case when the bulk of development was done several years ago.

I just re-checked my Junk mail folders, but I did not receive an email. Did you email to donburch888@hotmail.com, or through Github ?