Our forum migration to Discourse will be going on starting late today June 19 to 21. During the migration, the forums will be read-only, except for a single temporary forum (which will not be getting transferred). Read our announcement post for more information.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Error getting metadata for all new Episodes.

rodman3rodman3 Posts: 5Members, Plex Pass Plex Pass
edited June 13 in Linux

Can anyone figure out what might be going on here. All of a sudden all the new episodes that are added to my library, are missing the metadata. When I try to do a manual refresh of the metadata for that epsiode it doesnt retrive anything.

One of the errors I notice is a 404 error on https://meta.plex.tv/tv_e/279536/billions/2016

I have cleared the cache and I still get the same results. The server is on CentOS7.

Here is a snippet of the log.

`2018-06-13 10:01:40,408 (7f8bacff9700) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.thetvdb/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQozMjI5MHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQzCmNvbS5wbGV4YXBwLmFnZW50cy50aGV0dmRiOi8vMjc5NTM2P2xhbmc9ZW5zNApndWlkczYKMjc5NTM2czIKaWRyMAo_
2018-06-13 10:01:40,410 (7f8bacff9700) : DEBUG (runtime:49) - Received packed state data (556 bytes)
2018-06-13 10:01:40,412 (7f8bacff9700) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.thetvdb/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQozMjI5MHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQzCmNvbS5wbGV4YXBwLmFnZW50cy50aGV0dmRiOi8vMjc5NTM2P2xhbmc9ZW5zNApndWlkczYKMjc5NTM2czIKaWRyMAo_
2018-06-13 10:01:40,414 (7f8bacff9700) : DEBUG (model:32) - Loading model with GUID com.plexapp.agents.thetvdb://279536?lang=en
2018-06-13 10:01:40,416 (7f8bacff9700) : DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/a/6444790b3c46a83fcf8583b76b800b035534a9f.bundle/Contents/com.plexapp.agents.thetvdb/Info.xml
2018-06-13 10:01:40,420 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/32290/tree'
2018-06-13 10:01:40,530 (7f8bacff9700) : CRITICAL (agentkit:1063) - Exception when constructing media object for dbid 32290 (most recent call last):
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1058, in _update
level_attribute_keys=cls._level_attribute_keys)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 678, in TreeForDatabaseID
tree = MediaTree(cls._core, xml_obj[0], level_names, child_id=dbid if parent_id else None, level_attribute_keys=level_attribute_keys)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 557, in init
subitem = MediaTree(self._core, child, next_level_names, level_attribute_keys=next_level_attribute_keys)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 557, in init
subitem = MediaTree(self._core, child, next_level_names, level_attribute_keys=next_level_attribute_keys)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 561, in init
item = MediaItem(self._core, child)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 497, in init
part = MediaPart(self._core, child)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 470, in init
self.subtitles = SubtitlesDirectory(self._core, self._core.storage.join_path(self._path, 'Contents', 'Subtitle Contributions', self._core.identifier))
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 365, in init
self._core.storage.ensure_dirs(self._path)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/storage.py", line 132, in ensure_dirs
self.make_dirs(path)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/storage.py", line 128, in make_dirs
os.makedirs(path)
File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media/localhost/1/73b005332c39ea29041c4cb4b75cd9324a5a7b0.bundle/Contents/Subtitle Contributions'

2018-06-13 10:01:40,530 (7f8bacff9700) : INFO (init:785) - def update()
2018-06-13 10:01:40,531 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'https://tvdb2.plex.tv/series/279536?lang=en'
2018-06-13 10:01:40,964 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/services/tmdb?uri=/find/279536?external_source=tvdb_id'
2018-06-13 10:01:43,052 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/services/tmdb?uri=/tv/62852/recommendations'
2018-06-13 10:01:45,233 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'https://tvdb2.plex.tv/series/279536/actors'
2018-06-13 10:01:45,592 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'https://meta.plex.tv/tv_e/279536/billions/2016'
2018-06-13 10:01:45,790 (7f8bacff9700) : ERROR (networking:219) - Error opening URL 'https://meta.plex.tv/tv_e/279536/billions/2016'
2018-06-13 10:01:45,795 (7f8bacff9700) : DEBUG (networking:166) - Requesting 'https://tvdb2.plex.tv/series/279536/episodes?page=1'
2018-06-13 10:01:46,190 (7f8bacff9700) : DEBUG (threadkit:244) - Parallel task set UpdateEpisodes ended
2018-06-13 10:01:46,193 (7f8bacff9700) : CRITICAL (agentkit:1078) - Exception in the update function of agent named 'TheTVDB', called with guid 'com.plexapp.agents.thetvdb://279536?lang=en' (most recent call last):
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
agent.update(obj, media, lang, **kwargs)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/TheTVDB.bundle/Contents/Code/__init__.py", line 897, in update
def UpdateEpisodes():
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/threadkit.py", line 233, in _parallelize_decorator
f(*args, **kwargs)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-fd05be322/TheTVDB.bundle/Contents/Code/__init__.py", line 899, in UpdateEpisodes
ordering = media.settings.get('showOrdering', 'aired') if media.settings else 'aired'
AttributeError: 'NoneType' object has no attribute 'settings'

2018-06-13 10:01:46,197 (7f8bacff9700) : DEBUG (model:229) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/a/6444790b3c46a83fcf8583b76b800b035534a9f.bundle/Contents/com.plexapp.agents.thetvdb/Info.xml
2018-06-13 10:01:46,200 (7f8bacff9700) : DEBUG (runtime:88) - Sending packed state data (583 bytes)
2018-06-13 10:01:46,200 (7f8bacff9700) : DEBUG (runtime:924) - Response: [200] str, 16 bytes
`

Answers

  • ChuckPAChuckPA Posts: 22,838Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Something changed the permission (possibly ownership) of directories in your /var/lib/plexmediaserver structure.

    File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media/localhost/1/73b005332c39ea29041c4cb4b75cd9324a5a7b0.bundle/Contents/Subtitle Contributions'
    

    Correct this with (big hammer method if needed):

    sudo chown -R plex:plex /var/lib/plexmediaserver
    sudo find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;
    sudo find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;
    

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • rodman3rodman3 Posts: 5Members, Plex Pass Plex Pass

    Thank you, this fixed it. I'm using a python script to refresh my library when rclone detects changes, but when it runs as a service it looks like the files that the plex scanner generates are not under the plex user. I changed the service to run under the plex user, and it looks like its working properly now for new downloads. Thank you!

Sign In or Register to comment.