Trouble building the local DB

Hi,

I’m running Mopidy 2.0.0 in a Raspberry B, and having issues to look for local mp3 files.
It is working OK when accessing Spotify though.

mopidy local scan gives the following error on ALL mp3 files

mopidy local scan
INFO Starting Mopidy 2.0.0
INFO Loading config from builtin defaults
INFO Loading config from /home/pi/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: mopify, spotify, mpd, http, stream, m3u, softwaremixer, file, local
INFO Disabled extensions: none
INFO Found 16 files in media_dir.
INFO Checking 0 tracks from library.
INFO Removing 0 missing tracks.
INFO Found 16 tracks which need to be updated.
INFO Scanning…
WARNING Failed local:track:01%20Hugh%20Laurie%20-%20St.%20James%20Infirmary.mp3: Track shorter than 100ms
WARNING Failed local:track:02%20Hugh%20Laurie%20-%20You%20Don%27t%20Know%20My%20Mind.mp3: Track shorter than 100ms
WARNING Failed local:track:03%20Hugh%20Laurie%20-%20Six%20Cold%20Feet.mp3: Track shorter than 100ms
WARNING Failed local:track:04%20Hugh%20Laurie%20-%20Buddy%20Bolden%27s%20Blues.mp3: Track shorter than 100ms
WARNING Failed local:track:05%20Hugh%20Laurie%20-%20Battle%20Of%20Jericho.mp3: Track shorter than 100ms
WARNING Failed local:track:06%20Hugh%20Laurie%20-%20After%20You%27ve%20Gone.mp3: Track shorter than 100ms
WARNING Failed local:track:07%20Hugh%20Laurie%20-%20Swanee%20River.mp3: Track shorter than 100ms
WARNING Failed local:track:08%20Hugh%20Laurie%20-%20The%20Whale%20Has%20Swallowed%20Me.mp3: Track shorter than 100ms
WARNING Failed local:track:09%20Hugh%20Laurie%20-%20John%20Henry.mp3: Track shorter than 100ms
WARNING Failed local:track:10%20Hugh%20Laurie%20-%20Police%20Dog%20Blues.mp3: Track shorter than 100ms
WARNING Failed local:track:11%20Hugh%20Laurie%20-%20Tipitana.mp3: Track shorter than 100ms
WARNING Failed local:track:12%20Hugh%20Laurie%20-%20Winin%27%20Boy%20Blues.mp3: Track shorter than 100ms
WARNING Failed local:track:13%20Hugh%20Laurie%20-%20They%27re%20Red%20Hot.mp3: Track shorter than 100ms
WARNING Failed local:track:14%20Hugh%20Laurie%20-%20Baby%2C%20Please%20Make%20A%20Change.mp3: Track shorter than 100ms
WARNING Failed local:track:15%20Hugh%20Laurie%20-%20Let%20Them%20Talk.mp3: Track shorter than 100ms
WARNING Failed local:track:a.mp3: Track shorter than 100ms
INFO Scanned 16 of 16 files in 7s.
INFO Done scanning.

Any hint on how to troubleshoot?

thanks in advance for your help

Tried gst-discoverer-1.0 ~/Music/*.mp3 | grep Duration, all files are seen with zero duration from GStreamer, so the bug seems to be there.

I tried a dirty temporary solution modifying /usr/lib/python2.7/dist-packages/mopidy/audio/scan.py:
Added at the beginning of def _query_duration(pipeline, timeout=100):
return 1000000

It stopped returning zero lenght errors, and it logged more than 300 mp3 files but then I get the following error:

ERROR    Expected last_modified to be at least 0, not -2147483648000
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 134, in main
    return args.command.run(args, proxied_config)
  File "/usr/lib/python2.7/dist-packages/mopidy/local/commands.py", line 151, in run
    uri=uri, length=result.duration, last_modified=mtime)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 214, in replace
    other = super(ValidatedImmutableObject, self).replace(**kwargs)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 116, in replace
    other._set_field(key, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 186, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 131, in validate
    (self._name, self._min, value))
ValueError: Expected last_modified to be at least 0, not -2147483648000
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==2.0.0', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 134, in main
    return args.command.run(args, proxied_config)
  File "/usr/lib/python2.7/dist-packages/mopidy/local/commands.py", line 151, in run
    uri=uri, length=result.duration, last_modified=mtime)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 214, in replace
    other = super(ValidatedImmutableObject, self).replace(**kwargs)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 116, in replace
    other._set_field(key, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 186, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 131, in validate
    (self._name, self._min, value))
ValueError: Expected last_modified to be at least 0, not -2147483648000

not sure if I broke something with my mod, or if it’s another independent error.

Any help will be appreciated!
regards

These all sound like known upstream issues in gstreamer: https://github.com/mopidy/mopidy/issues/1474

Thanks jcass77, that seems to be the case on the scan issue.

The second error I got was related to some mp3 files that had invalid dates (not sure how that happened), but correcting the dates on those files with touch made it disappear.

regards