Could you try defining your media_dir to be some directory with just a few mp3 files in it, and see how that scan goes? Earlier you stated:
But this scan log shows it has a load of folders in it.
Could you try defining your media_dir to be some directory with just a few mp3 files in it, and see how that scan goes? Earlier you stated:
But this scan log shows it has a load of folders in it.
Maybe you could also try running:
python -c "import os; print os.stat('e:\\music')"
What type of drive is this? NTFS? FAT32?
OK, so it turns out the output of os.stat
on Windows is dependent on what version of python you have. Versions before 3.x return dummy values for some of the fields, including the inode field (st_ino
) which we use to avoid getting stuck in symbolic/hard link loops. It looks to our code like all the files and directories are pointing to the same thing on the disk.
Try changing line 137 of _find_worker
in C:\Python27\lib\site-packages\mopidy\internal\path.py
to the following:
if st.st_ino != 0:
parents = parents + [(st.st_dev, st.st_ino)]
Okay got this output when I ran
python -c “import os; print os.stat(‘e:\music’)”
C:\WINDOWS\system32>python -c "import os; print os.stat('e:\\music')"
nt.stat_result(st_mode=16895, st_ino=0L, st_dev=0L, st_nlink=0, st_uid=0, st_gid=0, st_size=32768L, st_atime=1500167898L, st_mtime=1500167898L, st_ctime=1480002315L)
C:\WINDOWS\system32>
It’s a NTFS Folder.
changed lines 137 of C:\Python27\lib\site-packages\mopidy\internal\path.py
Current code on line 127-138:
if st.st_ino != 0:
parents = parents + [(st.st_dev, st.st_ino)]
Changed Media_DIR back to c:\mopidy\media Which has 5 .mp3 files in it.
Ran mopidy -vvv local scan
output:
C:\WINDOWS\system32>mopidy -vvv local scan
INFO 2017-07-20 11:30:09,934 [57728:MainThread] mopidy.__main__
Starting Mopidy 2.1.0
DEBUG 2017-07-20 11:30:10,009 [57728:MainThread] mopidy.ext
Loading entry point: mpd = mopidy.mpd:Extension
DEBUG 2017-07-20 11:30:10,009 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-MPD 2.1.0
DEBUG 2017-07-20 11:30:10,009 [57728:MainThread] mopidy.ext
Loading entry point: http = mopidy.http:Extension
DEBUG 2017-07-20 11:30:10,010 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-HTTP 2.1.0
DEBUG 2017-07-20 11:30:10,010 [57728:MainThread] mopidy.ext
Loading entry point: stream = mopidy.stream:Extension
DEBUG 2017-07-20 11:30:10,012 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-Stream 2.1.0
DEBUG 2017-07-20 11:30:10,012 [57728:MainThread] mopidy.ext
Loading entry point: m3u = mopidy.m3u:Extension
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-M3U 2.1.0
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-SoftwareMixer 2.1.0
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loading entry point: file = mopidy.file:Extension
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-File 2.1.0
DEBUG 2017-07-20 11:30:10,013 [57728:MainThread] mopidy.ext
Loading entry point: local = mopidy.local:Extension
DEBUG 2017-07-20 11:30:10,016 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-Local 2.1.0
DEBUG 2017-07-20 11:30:10,017 [57728:MainThread] mopidy.ext
Loading entry point: soundcloud = mopidy_soundcloud:SoundCloudExtension
DEBUG 2017-07-20 11:30:10,019 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-SoundCloud 2.0.2
DEBUG 2017-07-20 11:30:10,019 [57728:MainThread] mopidy.ext
Loading entry point: moped = mopidy_moped:MopedExtension
DEBUG 2017-07-20 11:30:10,020 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-Moped 0.7.1
DEBUG 2017-07-20 11:30:10,022 [57728:MainThread] mopidy.ext
Loading entry point: api_explorer = mopidy_explorer:APIExplorerExtension
DEBUG 2017-07-20 11:30:10,023 [57728:MainThread] mopidy.ext
Loaded extension: Mopidy-API-Explorer 1.0.1
DEBUG 2017-07-20 11:30:10,049 [57728:MainThread] mopidy.ext
Discovered extensions: mpd, http, stream, m3u, softwaremixer, file, local, soundcloud, moped, api_explorer
DEBUG 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config.keyring
Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (dbus not installed)
INFO 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config
Loading config from builtin defaults
DEBUG 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config
Loading config from C:\WINDOWS\system32\C failed; it does not exist
DEBUG 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config
Loading config from C:\ProgramData\mopidy\mopidy.conf failed; it does not exist
DEBUG 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config
Loading config from C:\WINDOWS\system32\C failed; it does not exist
INFO 2017-07-20 11:30:10,052 [57728:MainThread] mopidy.config
Loading config from C:\Users\Administrator\AppData\Local\mopidy\mopidy.conf
INFO 2017-07-20 11:30:10,055 [57728:MainThread] mopidy.config
Loading config from command line options
DEBUG 2017-07-20 11:30:10,056 [57728:MainThread] mopidy.config
Ignoring unknown config section: spotify
DEBUG 2017-07-20 11:30:10,056 [57728:MainThread] mopidy.config
Ignoring unknown config section: spotify_web
DEBUG 2017-07-20 11:30:10,086 [57728:MainThread] mopidy.ext
Validating extension: mpd
DEBUG 2017-07-20 11:30:10,088 [57728:MainThread] mopidy.ext
Validating extension: http
DEBUG 2017-07-20 11:30:11,111 [57728:MainThread] mopidy.ext
Validating extension: stream
DEBUG 2017-07-20 11:30:11,112 [57728:MainThread] mopidy.ext
Validating extension: m3u
DEBUG 2017-07-20 11:30:11,114 [57728:MainThread] mopidy.ext
Validating extension: softwaremixer
DEBUG 2017-07-20 11:30:11,115 [57728:MainThread] mopidy.ext
Validating extension: file
DEBUG 2017-07-20 11:30:11,117 [57728:MainThread] mopidy.ext
Validating extension: local
DEBUG 2017-07-20 11:30:11,118 [57728:MainThread] mopidy.ext
Validating extension: soundcloud
DEBUG 2017-07-20 11:30:11,124 [57728:MainThread] mopidy.ext
Validating extension: moped
DEBUG 2017-07-20 11:30:11,125 [57728:MainThread] mopidy.ext
Validating extension: api_explorer
INFO 2017-07-20 11:30:11,128 [57728:MainThread] mopidy.__main__
Enabled extensions: http, moped, stream, m3u, softwaremixer, file, api_explorer, local, soundcloud
INFO 2017-07-20 11:30:11,128 [57728:MainThread] mopidy.__main__
Disabled extensions: mpd
DEBUG 2017-07-20 11:30:11,259 [57728:MainThread] mopidy.local.commands
Using json as the local library
INFO 2017-07-20 11:30:11,263 [57728:MainThread] mopidy.local.commands
Found 7 files in media_dir.
DEBUG 2017-07-20 11:30:11,265 [57728:MainThread] mopidy.local.json
Loading library: C:\mopidy\local\library.json.gz
INFO 2017-07-20 11:30:11,266 [57728:MainThread] mopidy.local.commands
Checking 0 tracks from library.
INFO 2017-07-20 11:30:11,266 [57728:MainThread] mopidy.local.commands
Removing 0 missing tracks.
INFO 2017-07-20 11:30:11,266 [57728:MainThread] mopidy.local.commands
Found 7 tracks which need to be updated.
INFO 2017-07-20 11:30:11,267 [57728:MainThread] mopidy.local.commands
Scanning...
DEBUG 2017-07-20 11:30:11,290 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20In%20This%20Life.mp3
DEBUG 2017-07-20 11:30:11,303 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20Sometimes.mp3
DEBUG 2017-07-20 11:30:11,326 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20Sorry.mp3
DEBUG 2017-07-20 11:30:11,332 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20Sweet%20Love%20%28REDUX%29.mp3
DEBUG 2017-07-20 11:30:11,344 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20The%20X.mp3
DEBUG 2017-07-20 11:30:11,348 [57728:MainThread] mopidy.local.commands
Added local:track:Kaskade%20-%20We%20Dont%20Stop%20%28Elk%20Roads%20Late%20Night%20Drive%20Remix%29.mp3
DEBUG 2017-07-20 11:30:11,368 [57728:MainThread] mopidy.audio.scan
Using workaround for duration missing before play.
DEBUG 2017-07-20 11:30:11,395 [57728:MainThread] mopidy.local.commands
Added local:track:Maroon%205%20Feat.%20Future%20-%20Cold%20%28Kaskade%20%26%20Lipless%20Remix%29.mp3
INFO 2017-07-20 11:30:11,397 [57728:MainThread] mopidy.local.commands
Scanned 7 of 7 files in 0s.
ERROR 2017-07-20 11:30:11,404 [57728:MainThread] mopidy.__main__
[Error 183] Cannot create a file when that file already exists
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\mopidy\__main__.py", line 134, in main
return args.command.run(args, proxied_config)
File "C:\Python27\lib\site-packages\mopidy\local\commands.py", line 167, in run
library.close()
File "C:\Python27\lib\site-packages\mopidy\local\json.py", line 172, in close
'tracks': self._tracks.values()
File "C:\Python27\lib\site-packages\mopidy\internal\storage.py", line 58, in dump
os.rename(tmp.name, path)
WindowsError: [Error 183] Cannot create a file when that file already exists
Traceback (most recent call last):
File "C:\Python27\Scripts\mopidy-script.py", line 11, in <module>
load_entry_point('Mopidy==2.1.0', 'console_scripts', 'mopidy')()
File "C:\Python27\lib\site-packages\mopidy\__main__.py", line 134, in main
return args.command.run(args, proxied_config)
File "C:\Python27\lib\site-packages\mopidy\local\commands.py", line 167, in run
library.close()
File "C:\Python27\lib\site-packages\mopidy\local\json.py", line 172, in close
'tracks': self._tracks.values()
File "C:\Python27\lib\site-packages\mopidy\internal\storage.py", line 58, in dump
os.rename(tmp.name, path)
WindowsError: [Error 183] Cannot create a file when that file already exists
C:\WINDOWS\system32>
Any ideas to resolve this Sir?