Skip to content

get_authenticated_user fails when lastfm profile lacks age #9

@fmoga

Description

@fmoga

Here's the traceback from a get_authenticated_user call:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 2, in get_authenticated_user
  File "/usr/local/lib/python2.7/dist-packages/lastfm-0.2-py2.7.egg/lastfm/decorators.py", line 183, in async_callback
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/lastfm-0.2-py2.7.egg/lastfm/api.py", line 558, in get_authenticated_user
    return User.get_authenticated_user(self)
  File "/usr/local/lib/python2.7/dist-packages/lastfm-0.2-py2.7.egg/lastfm/user.py", line 516, in get_authenticated_user
    user._age = int(data.findtext('age'))
ValueError: invalid literal for int() with base 10: ''

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