Mopidy Discourse

Errors during local scan. last_modified is -1000(?)

I’ve been having issues with completing a local scan using mopidy local scan as well as sudo mopidyctl local scan. Errors are to do with Expected last_modified to be at least 0, not -1000.

I’m running into the same problem. I have a bunch of mp3 and m4a files that break the local scan process. The error is just references - 108000000.

Any idea how to fix this or how to fix the individual files so the scan process can finish?

I tried fixing the file by converting it from an m4a to an mp3 file (I copied the actual file contents into a new file and exported it to an mp3 file in Audacity Mac audio app), but it still throws the same error.

When doing that I did notice that the original file had only a ‘title’ and a ‘length’ tag on it.

Using Mopidy 3.2 on a fully updated Raspberry Pi 4 with enabled extensions: local, softwaremixer, tunein, stream, orfradio, m3u, http, iris, musicbox_webclient

DEBUG    [MainThread] mopidy_local.schema SQLite insert statement: INSERT OR REPLACE INTO track (uri, name, album, artists, composers, performers, genre, track_no, disc_no, date, length, bitrate, comment, musicbrainz_id, last_modified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) dict_values(['local:track:Unknown%20Artist/Unknown%20Album/You%20Don%27t%20Know%20What%27s%20Going%20On.m4a', "You Don't Know What's Going On.m4a", None, None, None, None, None, None, None, '2008-11-10', 170225, 256000, None, None, 1410373804000])
DEBUG    [MainThread] mopidy_local.commands Added local:track:Unknown%20Artist/Unknown%20Album/You%20Don%27t%20Know%20What%27s%20Going%20On.m4a
DEBUG    [MainThread] mopidy.audio.scan Using workaround for duration missing before play.
ERROR    [MainThread] mopidy.__main__ Expected last_modified to be at least 0, not -108000000
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mopidy/__main__.py", line 143, in main
    return args.command.run(args, proxied_config)
  File "/usr/local/lib/python3.9/dist-packages/mopidy_local/commands.py", line 95, in run
    self._scan_metadata(
  File "/usr/local/lib/python3.9/dist-packages/mopidy_local/commands.py", line 239, in _scan_metadata
    track = tags.convert_tags_to_track(result.tags).replace(
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 216, in replace
    other = super().replace(**kwargs)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 111, in replace
    other._set_field(key, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 188, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 135, in validate
    raise ValueError(
ValueError: Expected last_modified to be at least 0, not -108000000
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 11, in <module>
    load_entry_point('Mopidy==3.2.0', 'console_scripts', 'mopidy')()
  File "/usr/lib/python3/dist-packages/mopidy/__main__.py", line 143, in main
    return args.command.run(args, proxied_config)
  File "/usr/local/lib/python3.9/dist-packages/mopidy_local/commands.py", line 95, in run
    self._scan_metadata(
  File "/usr/local/lib/python3.9/dist-packages/mopidy_local/commands.py", line 239, in _scan_metadata
    track = tags.convert_tags_to_track(result.tags).replace(
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 216, in replace
    other = super().replace(**kwargs)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 111, in replace
    other._set_field(key, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 188, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 135, in validate
    raise ValueError(
ValueError: Expected last_modified to be at least 0, not -108000000