mopidy / mopidy-soundcloud

Mopidy extension for playing music from SoundCloud
https://mopidy.com/ext/soundcloud/
MIT License
185 stars 59 forks source link

AttributeError: 'NoneType' object has no attribute 'status_code' #53

Closed wernight closed 6 years ago

wernight commented 9 years ago

Worked well and without change it seems that SoundCloud stopped working for some reason:

ERROR    Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 274, in run
    backends = self.start_backends(config, backend_classes, audio)
  File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 352, in start_backends
    config=config, audio=audio).proxy()
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
    obj = cls(*args, **kwargs)
  File "/usr/share/mopidy/mopidy_soundcloud/actor.py", line 21, in __init__
    self.remote = SoundCloudClient(config['soundcloud'])
  File "/usr/share/mopidy/mopidy_soundcloud/soundcloud.py", line 80, in __init__
    if err.response.status_code == 401:
AttributeError: 'NoneType' object has no attribute 'status_code'

May be first step would be to handle correctly err.response is None.

kingosticks commented 6 years ago

The error handling is improved in #100, I believe this is now fixed.