Skip to content

Error while fetching anime info. #3

@nins-k

Description

@nins-k

Started getting this error while retrieving info on any anime about a week ago.

AttributeError: 'NoneType' object has no attribute 'parent' 
(file "/usr/local/lib/python2.7/dist-packages/myanimelist/media.py", line 193, in parse)

I had no idea what to do so I tried commenting out the following lines (193-195) which restored partial functionality.

synopsis_elt = media_page.find(u'h2', text=u'Synopsis').parent
utilities.extract_tags(synopsis_elt.find_all(u'h2'))
media_info[u'synopsis'] = synopsis_elt.text.strip()

This let me fetch an anime's title, rank, score, episodes but keeps returning NoneType for every call to anime.related

The complete nosetests results are in this gist.

This API is really awesome so hoping it'll be fixed.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions