# MPC doesn't find file

**URL:** <https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357>\
**Category:** Misc\
**Created:** [October 9, 2020, 9:38am UTC](https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357 "2020-10-09T09:38:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Lambert](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/steve_lambert/32/1149_2.png) [@Steve\_Lambert](https://discourse.mopidy.com/u/Steve_Lambert)\
**Post date:** [October 9, 2020, 9:38am UTC](https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357/1 "2020-10-09T09:38:08Z")

</div>

Running Mopidy 3.0.2 as system and have installed Mopidy-Local and Mopidy-MPD. running a mopidyctl local scan shows up the files in the directory however MPC can’t find or add them.  
I’ve installed (then removed) MPD and with that installed MPC finds and adds the file.  
It’s something obvious I’ve missed, but I’ve been through the docs and tried many variations but can’t seem to resolve this.

Below is the result of the scan and mpc

```auto
pi@Lounge:~ $ sudo mopidyctl local scan
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf local scan" as user mopidy
INFO [MainThread] mopidy. __main__ Starting Mopidy 3.0.2
INFO [MainThread] mopidy.config Loading config from builtin defaults
INFO [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
INFO [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
INFO [MainThread] mopidy.config Loading config from command line options
INFO [MainThread] mopidy. __main__ Enabled extensions: softwaremixer, m3u, local, musicbox_webclient, stream, iris, file, mpd, ht tp, spotify
INFO [MainThread] mopidy. __main__ Disabled extensions: none
INFO [MainThread] mopidy_local.commands Finding files in file:///home/pi/Music ...
INFO [MainThread] mopidy_local.commands Found 19 files in file:///home/pi/Music
INFO [MainThread] mopidy_local.commands Checking 17 tracks from library
INFO [MainThread] mopidy_local.commands Removing 0 missing tracks
INFO [MainThread] mopidy_local.commands Found 0 tracks which need to be updated
INFO [MainThread] mopidy_local.commands Scanning...
INFO [MainThread] mopidy_local.commands Scanned 0 of 0 files in 0.000s.
INFO [MainThread] mopidy_local.commands Done scanning
INFO [MainThread] mopidy_local.storage Cleaning up image directory

```

```auto
pi@Lounge:~ $ mpc add "/home/pi/Music/Graceland 25th Anniversary Edition/05 - Diamonds on the Soles of Her Shoes [Clean].mp3"
error adding /home/pi/Music/Graceland 25th Anniversary Edition/05 - Diamonds on the Soles of Her Shoes [Clean].mp3: directory or file not found

```

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [October 9, 2020, 12:24pm UTC](https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357/2 "2020-10-09T12:24:36Z")

</div>

The path  
“/home/pi/Music/Graceland 25th Anniversary Edition/05 - Diamonds on the Soles of Her Shoes [Clean].mp3” doesn’t mean anything to Mopidy. You need to give it a path (URI) it can understand, which may or may not have any relation to the path on your filesystem (for Mopidy-Local it currently does but that could change). Use `mpc ls` to browse the _virtual filesystem_ exposed by Mopidy and find the URI for the track you want, for example:

```auto
nick@xps:~$ mpc ls 
Files
Local media
SoundCloud
TuneIn

nick@xps:~$ mpc ls "Local media"
Local media/Albums
Local media/Artists
Local media/Composers
Local media/Genres
Local media/Performers
Local media/Release Years
Local media/Tracks
Local media/Last Week's Updates
Local media/Last Month's Updates

nick@xps:~$ mpc ls "Local media/Tracks"
local:track:Music/song.mp3

mpc add "local:track:Music/song.mp3"

```

mpd and Mopidy have different URI schemes and expose different virtual filesystems for the same media collection. The path for a given track may therefore also be different and should not be considered interchangeable between these two different programs.

Mopidy-File (bundled with Mopidy) has a different approach and the URIs exposed will always be related to the path on your filesystem, but you still need to specify the `file://` prefix so Mopidy can understand e.g.

```auto
nick@xps:~$ mpc ls "Files"
Files/Music
Files/Home

nick@xps:~$ mpc ls "Files/Music"
file:///home/nick/Music/song.mp3

```

---

<div class="post-metadata">

**Author:** ![Steve\_Lambert](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/steve_lambert/32/1149_2.png) [@Steve\_Lambert](https://discourse.mopidy.com/u/Steve_Lambert)\
**Post date:** [October 9, 2020, 12:53pm UTC](https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357/3 "2020-10-09T12:53:17Z")

</div>

So simple when you know - thanks so much for that, I spent ages trying to puzzle it out.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [October 9, 2020, 1:29pm UTC](https://discourse.mopidy.com/t/mpc-doesnt-find-file/4357/4 "2020-10-09T13:29:19Z")

</div>

No worries. It’s kind of a general MPD thing rather than a Mopidy thing, you just never notice it when dealing with a mpd’s “simple” database plugin (unless you are also using it’s mount functionality). But I guess you would run into something similar when using mpd’s “proxy” or “upnp” database plugins; or one of it’s more exotic storage plugins.
