Can't remove folder from library: "Your changes could not be saved"

Server Version#:1.18.2.2015
Player Version#:

When I recently moved my Plex server to a new Mac I moved all the Movies and TV content to the new Mac but left the Music on the old Mac and had Plex refer to it via a network share at the same pathname as before.

This worked—kind of—but is problematic because changes in the Music library are not noticed by Plex until I do a manual scan which takes a long time, and in addition file deletions and renames are not noticed by Plex at all, leading to duplicate and incorrect entries.

So I relented and copied all the Music to the new Mac so that it would again be local to the Plex server. I edited the library settings to add the local folder on the new Mac, saved that without issue, and did a library scan, which took days (it’s a large library).

When that completed I was left with duplicate entries for every album and track in the library.

Now I want to remove the network share folder from the library settings, rescan, and empty the trash.

But I can’t remove the share folder. Every time I try it reports “Your changes could not be saved.” Every attempt produces entries like this in the Plex Media Server log:

Nov 10, 2019 00:41:28.518 [0x700002ad3000] ERROR - Exception inside transaction (inside=1) (…/Library/MediaItem.cpp:532): Cannot convert data to std::tm.

Nov 10, 2019 00:41:28.596 [0x700002ad3000] ERROR - Exception inside transaction (inside=1) (…/Library/Scanner/SectionLocation.cpp:59): Cannot convert data to std::tm.

Nov 10, 2019 00:41:28.597 [0x700002ad3000] ERROR - Exception inside transaction (inside=1) (…/Library/LibraryRequestHandler.cpp:3774): Cannot convert data to std::tm.

Nov 10, 2019 00:41:28.597 [0x700002ad3000] ERROR - Soci Exception handled: Cannot convert data to std::tm.

I’ve tried all the following (multiple times) in an attempt to fix this:

  • Repair the database
  • Optimize database
  • Clean bundles
  • Empty trash
  • Restart PMS
  • Restart the Mac
  • Use a different Web browser

All to no avail.

Can anyone suggest a way forward with this? My Music library is in a right mess now and it’s very frustrating.

Thanks.

1.move all files for the media item out of the directory your Library is looking at, so Plex will            not “see” it anymore
2.scan the library library (to detect changes)
3.empty trash
4.clean bundles
5.double check naming schema and move files back
6.scan the library

Start again. add your music back to the same location

1 Like

Thanks, but I’ve tried all this and more with no effect. The network share pointing to the old Music location is no longer mounted on the new Mac and the files are certainly invisible to Plex. A library scan (which takes ages) produces a line like this for every track at the old location:

File ‘/Volumes/iTunes Media/Music/Stacey Kent/Raconte-moi/02 Jardin d’hiver.m4a’ didn’t exist, can’t skip.

At the end of this scan “Empty Trash” has no visible effect on which tracks are still known to Plex. Everything is still duplicated and every album/track appears twice. The versions at the old location are inaccessible and unplayable but they’re still in Plex. And then it won’t let me remove that old location from the list of library folders because “Your changes could not be saved”.

At this point I’m thinking that I should just abandon this Music library entirely (with all its play history and saved state) and recreate it from scratch using the files in the new location. But I would prefer not to, and this is not supposed to be necessary. I should be able to move my content to a new location on the same server.

Can you delete from the “Get info” panel.

Example:

Yes (thanks), but there are 14,000 albums and 250,000 tracks and it’s not practical to remove them that way unless there’s some way to enumerate just the tracks at the old location and bulk-delete them.

If I were able to remove them that way I’d still be left with an unremovable folder in the Library path but I could live with that since I would only rarely see it.

1 Like

You have removed the Library link and restarted the server to force a scan?

If so just delete Library’ Nuke the dam thing" and start a fresh by pointing to your storage location and let it scan.

It’s not letting me remove the old library link, that’s the whole problem. “Your changes could not be saved” so I can’t get rid of that folder. Restarting the server after that doesn’t fix it either.

Deleting the library and recreating it from scratch is a last resort but I guess I’ve reached that point. I share this library with others so it will be disruptive but I don’t see another solution.

Try this first, go to Allowed Devices pane and see if you have two servers. Delete the old one.

I do have two servers, though the other one is remote and has nothing to do with the local server. Nevertheless I deleted the other one (I don’t need it right now and I can easily relink it if I do).

No change, though. I again removed the old folder, Save Changes, “Your changes could not be saved”, shut down and restarted the server, started another scan, and I’m still seeing lines of the form

File ‘/Volumes/iTunes Media/Music/Stacey Kent/Raconte-moi/02 Jardin d’hiver.m4a’ didn’t exist, can’t skip.

Nuts.

Let us see the exact paths please. Screenshot the Edit Library window like SE56 did. Reading your thread I’m guessing the error isn’t descriptive of the fundamental issue.

Then use a terminal to cd the the parent directory of the one you’re trying to remove, and let us see the output of

ls -Al

What other ERROR messages appear in your server.log?

Initial Edit Library window:

The library is named “Legacy Music” because I renamed it in preparation for replacing it with a newly re-created “Music” library.

The folder I want to remove is the iTunes Music library which is remote to the system on which Plex is running. The new location is on the local “Archive” volume (counterintuitive name but at the moment it’s the only place with sufficient space for the library).

I click the “X” next to the iTunes location and get this:

Then I click “SAVE CHANGES” and get this:

The files at the parent of the old location (“iTunes Media”) are unsurprising since it’s the top level of an iTunes library:

gem:iTunes Media rrg$ ls -lA
total 64
-rw-r--r--@    1 rrg  staff   16388 Nov 11 14:49 .DS_Store
-rw-r--r--@    1 rrg  staff     305 Jul 15  2012 .iTunes Preferences.plist
drwxr-xr-x     4 rrg  staff     136 Dec 31  2018 Audiobooks
drwxr-xr-x     3 rrg  staff     102 Aug 10  2014 Automatically Add to iTunes.localized
drwxr-xr-x     4 rrg  staff     204 Apr 23  2019 Books
drwxr-xr-x@    2 rrg  staff      68 Mar 24  2019 Downloads
drwxr-xr-x     2 rrg  staff     306 Apr 22  2019 Home Videos
drwxr-xr-x     3 rrg  staff   21522 Jul 31  2017 Mobile Applications
drwxr-xr-x     6 rrg  staff     238 Apr 22  2019 Movies
drwxr-xr-x  4541 rrg  staff  154428 Nov 11 15:01 Music
drwxr-xr-x    11 rrg  staff     408 Sep 14  2017 Podcasts
drwxr-xr-x     9 rrg  staff     340 Jan  6  2017 TV Shows
drwxr-xr-x     2 rrg  staff     204 Jul 15  2012 Tones
drwxr-xr-x     2 rrg  staff     510 Apr 22  2019 Voice Memos

There are no ERRORs in the log apart from the ones I already mentioned, which appear after “SAVE CHANGES” is invoked:

Nov 11, 2019 15:33:52.240 [0x70000ccb7000] ERROR - Exception inside transaction (inside=1) (../Library/MediaItem.cpp:532): Cannot convert data to std::tm.
Nov 11, 2019 15:33:52.322 [0x70000ccb7000] ERROR - Exception inside transaction (inside=1) (../Library/Scanner/SectionLocation.cpp:59): Cannot convert data to std::tm.
Nov 11, 2019 15:33:52.322 [0x70000ccb7000] ERROR - Exception inside transaction (inside=1) (../Library/LibraryRequestHandler.cpp:3774): Cannot convert data to std::tm.
Nov 11, 2019 15:33:52.322 [0x70000ccb7000] ERROR - Soci Exception handled: Cannot convert data to std::tm.

Ok so you’re trying to remove a directory from a Library that has two directories listed, and the one you want to remove happens to also be the Music folder for iTunes on an old Mac.

Is the old Mac up and running with the network share mounted when you’re trying to remove the path from your PMS library?

You’re getting an error about converting data to a time of day format, which other people have indicated was precipitated by a failure to access a filesystem for various reasons.

If it can’t get the data, it can’t convert it a time of day format.
Just a guess.

btw how do you feel about uploading log files?

I’ve tried it both ways (network share mounted and not mounted) and the results are the same regardless.

I suppose I could upload a bigger section of the logs, but Plex is tremendously chatty and most of it is irrelevant.

Here’s a section of the server log just before and after two successive attempts to “SAVE CHANGES” with the modified folder list. The network share was mounted and accessible at that time.

Log level is Debug but I can set it to Verbose for a short time and try it again if you think that might be useful.

For longer excerpts from the log I would upload them somewhere and post a link.

Nov 11, 2019 20:15:59.728 [0x700001556000] DEBUG - [PlexRelay] Bytes per second: sent 20.7, received 14.4

Nov 11, 2019 20:15:59.729 [0x700001868000] DEBUG - Jobs: '/Applications/Plex Media Server.app/Contents/MacOS/Plex Relay' exit code for process 96809 is 255 (failure)
Nov 11, 2019 20:16:02.211 [0x7000019f1000] DEBUG - Completed: [192.168.1.187:55892] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (8 live) TLS GZIP 20001ms 5 bytes (pipelined: 20)
Nov 11, 2019 20:16:02.215 [0x70000196e000] DEBUG - Auth: authenticated user 1 as rrgomes
Nov 11, 2019 20:16:02.215 [0x70000165c000] DEBUG - Request: [192.168.1.187:55892 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (7 live) TLS GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:02.215 [0x70000165c000] DEBUG - Content-Length is -1 (of total: -1).
Nov 11, 2019 20:16:04.765 [0x70000196e000] DEBUG - Completed: [192.168.1.189:51590] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (7 live) TLS GZIP 20006ms 5 bytes (pipelined: 20)
Nov 11, 2019 20:16:04.801 [0x7000019f1000] DEBUG - Auth: authenticated user 1 as rrgomes
Nov 11, 2019 20:16:04.801 [0x70000165c000] DEBUG - Request: [192.168.1.189:51590 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (7 live) TLS GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:04.801 [0x70000165c000] DEBUG - Content-Length is -1 (of total: -1).
Nov 11, 2019 20:16:16.030 [0x700001556000] DEBUG - [PlexRelay] Transferred: sent 11036, received 5672 bytes, in 337.5 seconds
Nov 11, 2019 20:16:16.036 [0x70000165c000] DEBUG - [PlexRelay] Bytes per second: sent 32.7, received 16.8
Nov 11, 2019 20:16:16.037 [0x700001868000] DEBUG - Jobs: '/Applications/Plex Media Server.app/Contents/MacOS/Plex Relay' exit code for process 96810 is 255 (failure)
Nov 11, 2019 20:16:20.185 [0x70000196e000] DEBUG - Auth: authenticated user 1 as rrgomes
Nov 11, 2019 20:16:20.185 [0x700001556000] DEBUG - Request: [192.168.1.187:56046 (Subnet)] PUT /library/sections/10?name=Legacy%20Music&type=artist&agent=tv.plex.agents.music&scanner=Plex%20Music&language=en&importFromiTunes=&enableAutoPhotoTags=&location=%2FVolumes%2FArchive%2FMusictown%2FMusic (9 live) TLS GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:22.216 [0x7000019f1000] DEBUG - Completed: [192.168.1.187:55892] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (8 live) TLS GZIP 20001ms 5 bytes (pipelined: 21)
Nov 11, 2019 20:16:22.218 [0x70000196e000] DEBUG - Auth: authenticated user 1 as rrgomes
Nov 11, 2019 20:16:22.218 [0x70000165c000] DEBUG - Request: [192.168.1.187:55892 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (8 live) TLS GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:22.218 [0x70000165c000] DEBUG - Content-Length is -1 (of total: -1).
Nov 11, 2019 20:16:23.464 [0x700001556000] DEBUG - It took 3280.000000 ms to retrieve 239752 items.
Nov 11, 2019 20:16:23.464 [0x700001556000] DEBUG - Soft-deleting media item 294902.
Nov 11, 2019 20:16:23.465 [0x700001556000] DEBUG - Updating deletion state for metadata item 315572, is has a dead item count of 1.
Nov 11, 2019 20:16:23.465 [0x700001556000] DEBUG - Marking item 315572 as deleted.
Nov 11, 2019 20:16:23.465 [0x700001556000] ERROR - Exception inside transaction (inside=1) (../Library/MediaItem.cpp:532): Cannot convert data to std::tm.
Nov 11, 2019 20:16:23.541 [0x700001556000] ERROR - Exception inside transaction (inside=1) (../Library/Scanner/SectionLocation.cpp:59): Cannot convert data to std::tm.
Nov 11, 2019 20:16:23.541 [0x700001556000] ERROR - Exception inside transaction (inside=1) (../Library/LibraryRequestHandler.cpp:3774): Cannot convert data to std::tm.
Nov 11, 2019 20:16:23.541 [0x700001556000] ERROR - Soci Exception handled: Cannot convert data to std::tm.
Nov 11, 2019 20:16:23.541 [0x70000196e000] DEBUG - Completed: [192.168.1.187:56046] 500 PUT /library/sections/10?name=Legacy%20Music&type=artist&agent=tv.plex.agents.music&scanner=Plex%20Music&language=en&importFromiTunes=&enableAutoPhotoTags=&location=%2FVolumes%2FArchive%2FMusictown%2FMusic (8 live) TLS GZIP 3356ms 484 bytes (pipelined: 1)
Nov 11, 2019 20:16:24.802 [0x70000196e000] DEBUG - Completed: [192.168.1.189:51590] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (8 live) TLS GZIP 20001ms 5 bytes (pipelined: 21)
Nov 11, 2019 20:16:24.815 [0x7000019f1000] DEBUG - Auth: authenticated user 1 as rrgomes
Nov 11, 2019 20:16:24.816 [0x70000165c000] DEBUG - Request: [192.168.1.189:51590 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (8 live) TLS GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:24.816 [0x70000165c000] DEBUG - Content-Length is -1 (of total: -1).
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - NetworkService: Replacing an old server at index 1 and address 169.254.115.236 (we just got packet from 192.168.1.187, index 1)
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - NetworkServiceBrowser: SERVER updated: 192.168.1.187 (Black)
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - Notifying the system bundle an update to server /system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - HTTP requesting GET http://127.0.0.1:55827/system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.128 [0x70000219e000] DEBUG - Request: [127.0.0.1:56051 (Loopback)] GET /servers (9 live) GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:35.128 [0x70000196e000] DEBUG - Completed: [127.0.0.1:56051] 200 GET /servers (9 live) GZIP 0ms 487 bytes
Nov 11, 2019 20:16:35.130 [0x700001556000] DEBUG - Request: [127.0.0.1:56052 (Loopback)] GET /library/sections (9 live) GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:35.131 [0x70000196e000] DEBUG - Completed: [127.0.0.1:56052] 200 GET /library/sections (9 live) GZIP 1ms 1440 bytes
Nov 11, 2019 20:16:35.133 [0x70000219e000] DEBUG - Request: [127.0.0.1:56053 (Loopback)] GET /channels/all (9 live) GZIP Signed-in Token (rrgomes)
Nov 11, 2019 20:16:35.133 [0x70000196e000] DEBUG - Completed: [127.0.0.1:56053] 200 GET /channels/all (9 live) GZIP 0ms 840 bytes
Nov 11, 2019 20:16:35.135 [0x7000024b0000] DEBUG - HTTP 200 response from GET http://127.0.0.1:55827/system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.135 [0x7000024b0000] DEBUG - [com.plexapp.system] HTTP reply status 200, with 0 bytes of content.

Does your authorized devices still show two servers?
https://app.plex.tv/desktop#!/settings/devices/pms

There are network problems in your log.

Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - NetworkService: Replacing an old server at index 1 and address 169.254.115.236 (we just got packet from 192.168.1.187, index 1)
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - NetworkServiceBrowser: SERVER updated: 192.168.1.187 (Black)
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - Notifying the system bundle an update to server /system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/notify/serverUpdated?host=192.168.1.187
Nov 11, 2019 20:16:35.121 [0x7000024b0000] DEBUG - HTTP requesting GET http://127.0.0.1:55827/system/notify/serverUpdated?host=192.168.1.187

For what it’s worth, these were the articles covering what you got into.

There’s only one server showing in the authorized devices list.

Thanks, yes, I used both those support articles in the course of all this. The original server move (from one Mac to another) happened months ago and has been problem-free apart from its inability to notice changes in the remote Music library, which led me to attempt this move.

I’m not sure that log message about “Replacing an old server…” is an error, might be just some Plex housekeeping thing (the 169.254.115.236 address it refers to is a local-link alias for the main 192.168 address), but…I don’t know.

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