The following is not my code, but code I have to work with...
class MediaRoot:
def __init__(self, type):
self.name = ''
self.year = None
self.type = type
self.parts = []
self.subtitles = []
self.thumbs = []
self.arts = []
self.trailers = []
self.released_at = None
self.display_offset = 0
self.source = None
self.themes = []
class Movie(MediaRoot):
def __init__(self, name, year=None):
MediaRoot.__init__(self,'Movie')
self.name = name
self.year = year
self.guid = None
I have an object named "media" of type Movie, and I can work with its name and year attributes and do all the standard manipulations. I also know that there is a value stored in "source" that I'd very much like to access, but whenever I try it it blows up on me with the following error:
File "/Users/john/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 626, in __getattr__
return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
Is this attribute just forever out of reach?