Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore invalid data structures #20

merged 1 commit into from Apr 8, 2019


None yet
1 participant
Copy link

amelchio commented Apr 8, 2019

There are well-known types of favorites that are currently not handled. This PR makes those items be ignored.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/temp/sonossources/lib/python3.6/site-packages/pysonos/", line 165, in get_sonos_favorites
    return self.get_music_library_information(*args, **kwargs)
  File "/temp/sonossources/lib/python3.6/site-packages/pysonos/", line 316, in get_music_library_information
    items = from_didl_string(response['Result'])
  File "/temp/sonossources/lib/python3.6/site-packages/pysonos/", line 52, in from_didl_string
    item = cls.from_element(elt)
  File "/temp/sonossources/lib/python3.6/site-packages/pysonos/", line 496, in from_element
  File "/temp/sonossources/lib/python3.6/site-packages/pysonos/", line 175, in from_element
    raise DIDLMetadataError('Could not create Resource from Element: '
pysonos.exceptions.DIDLMetadataError: Could not create Resource from Element: protocolInfo not found (required).

@amelchio amelchio merged commit ffa16a3 into master Apr 8, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.