Help with error on metadata update

I’m trying to wrap up the final pieces to get my metadata agent for AniDB working, but there are still some issues I cannot solve. The agent works just fine in my Linux/Plex server, but just to be a good boy I decided to test it on OSX as well. Bad idea. I end up with a strange error when the update method is called, after the metadata has been set and Plex is trying to save it (I think). This is what I get in the logs - if anyone can help me with this I’d be really grateful.



Thanks!



2012-02-08 20:23:42,712 (-4faed000) : CRITICAL (model:181) - Exception serializing TV_Show with guid ‘com.plexapp.agents.anidb://1081?lang=en’ (most recent call last):

File “/Users/xxx/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py”, line 179, in _write

self._serialize(os.path.join(self._storage_path, subdir))

File “/Users/xxx/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py”, line 208, in _serialize

attr_el = attr._serialize(os.path.join(path, name))

File “/Users/xxx/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/attributes.py”, line 289, in _serialize

item_el = item._serialize(os.path.join(path, item._name))

File “/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py”, line 60, in join

AttributeError: ‘int’ object has no attribute ‘startswith’

Seriously, no one? It’s a bit hard to use an API that behaves differently on different platforms. Might have to do with the fact that the python version in Plex differs



Linux (Qnap embedded) - 2.7

Windows - 2.6

OSX - 2.5



…?

Can you Log() some stuff from within your agent code to track where the problem occurs?

Sander, thanks for you reply. The problem was that the error occurred when Plex was trying to serialise the metadata - ie. after the update method had returned so there was no way for me to log anything more than I already did. I tried adding log statements in the framework code but that was seen as bad by Plex so it was either replaced or the framework wouldn’t start. A bit more tracing in the framework would have been nice.



I finally solved the problem - iterating the seasons by number (int) seemed to work but when serializing it raised an exception when trying to convert the int to a string (as per my first message).

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