我正在开发一个调用soundcloud api的应用程序,在本例中使用pythonsoundcloudsdk(https://developers.soundcloud.com/docs/api/guide#uploading-files)上载一个曲目
我已经验证令牌是否有效,可以丢弃该案例,这是执行请求的代码:
import soundcloud
import sys, json
def uploadTrack(token, title, file):
# create a client object with access token
client = soundcloud.Client(access_token=token)
# upload audio file
track = client.post('/tracks', track={
'title': title,
'downloadable': 'true',
'asset_data': open(file, 'rb')
})
在结果回调中,我得到以下错误
^{2}$但是,当我检查用户的soundcloud帐户时,该曲目出现在那里(成功上传)。在
目前没有回答
相关问题 更多 >
编程相关推荐