DB error: no such collation sequence: naturalsort

Hi all,

I’ve been trying to rebuild my database on my Ubuntu server (following https://support.plex.tv/articles/201100678-repair-a-corrupt-database/), but I’m getting an error when trying to rebuild from the sql. Specifically:

# sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
# rm com.plexapp.plugins.library.db
# sqlite3 com.plexapp.plugins.library.db < dump.sql
Error: near line 464165: no such collation sequence: naturalsort

I’ve also tried dropping the index as suggested on that same page, but to no avail.

I get the same error when trying to create a playlist with PlexPlaylistImporter. Happy to send the sql dump to someone to look at, but would prefer not to post them publicly… Any thoughts on how to resolve are much appreciated…

Thanks…

Server Version#: 1.13.9.5456 (Plex Pass)
Ubuntu Server 14.04

you did the DROP before dumping to the SQL ?

hi, yeah, dropped before dumped…

Would you mind grep on the SQL file and see if it’s elsewhere? If so, I will need to go back and ask why.

Thanks Chuck:

Line 122: INSERT INTO "schema_migrations" VALUES('20180501000000','DROP index ''index_title_sort_naturalsort''',1);
Line 321886: INSERT INTO "sqlite_stat1" VALUES('metadata_items','index_title_sort_naturalsort','36955 2');
Line 464165: CREATE INDEX 'index_title_sort_naturalsort' ON 'metadata_items' ('title_sort' COLLATE naturalsort);
Line 464165: CREATE INDEX 'index_title_sort_naturalsort' ON 'metadata_items' ('title_sort' COLLATE naturalsort);

This line,

Line 464165: CREATE INDEX 'index_title_sort_naturalsort' ON 'metadata_items' ('title_sort' COLLATE naturalsort);

tells me the Index wasn’t DROPped before the .dump was done.

If you run grep -v naturalsort against the SQL file, removing references to naturalsort, and then using that result, what do you get?

That fixed it - thanks Chuck.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.