我是 python 新手。我正在尝试使用pyechonesttrack_from_file
中的方法来创建轨道对象。这是我写的代码:
from pyechonest import config
from pyechonest.track import track_from_file
config.ECHO_NEST_API_KEY = "KRZG4XOVUQRKI45DP"
f = open("ShayneWard-NoPromises.mp3")
t = track_from_file(f, 'mp3')
但这不起作用。我有一个EchoNestIOError
. 这是我得到的完整错误 Traceback。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 243, in track_from_file
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 331, in track_from_md5
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 209, in _profile
File "build/bdist.linux-x86_64/egg/pyechonest/util.py", line 257, in callm pyechonest.util.
EchoNestIOError: Echo Nest Unknown Error
谁能告诉我我做错了什么?