我试图在Soundcloud Python api文档中关注this example:
我在Mac OS 10.10上,当我尝试运行示例代码时出现此错误。我的api密钥确实有效,其他一些例子确实有效。
import soundcloud
# create a client object with your app credentials
client = soundcloud.Client(client_id='YOUR_CLIENT_ID')
# find all sounds of buskers licensed under 'creative commons share alike'
tracks = client.get('/tracks', q='buskers', license='cc-by-sa')
我收到以下错误:
Traceback (most recent call last):
File "music.py", line 7, in <module>
tracks = client.get('/tracks', q='buskers')
File "build/bdist.macosx-10.10-intel/egg/soundcloud/client.py", line 130, in _request
File "build/bdist.macosx-10.10-intel/egg/soundcloud/resource.py", line 52, in wrapped_resource
TypeError: decode() argument 1 must be string, not None