Open Ashish0804 opened 3 years ago
There are other errors on that line
This fixed them
return {'ids': {'trakt': self.trakt_id, 'slug': self.slug,
'imdb': self.imdb_id, 'tmdb': self.tmdb_id}}
you are using constructor with data in an unexpected way:
Movie(title=res['Title'], imdb_id=res['imdbID'])
you need to pass ids as ids=dict
rather than individual parameters:
Movie(title=res['Title'], ids= {'trakt': trakt_id, 'slug': self.slug, 'imdb': self.imdb_id, 'tmdb': self.tmdb_id})
this is later filled into *_id
via extract_ids
(in method _build
).
Adding .trakt
in my fork:
but due to different reasons.
Looks like
trakt
was never initialized and thus error. https://github.com/moogar0880/PyTrakt/blob/033f2ed37590621868bba6253ed5435e61e69171/trakt/movies.py#L194Changing it to
trakt_id
should fix things but I haven't tested it myself.Here's the full error log
Here's how
Movie
object is being used in my coderes
is the response forOMDB
api.