[zoe_env@218 examples]$ python task2_cakir.py -p task2_cakir.defaults.yaml -s fnn
Traceback (most recent call last):
File "task2_cakir.py", line 28, in <module>
from dcase_framework.application_core import BinarySoundEventAppCore
File "/home/zoe_env/DCASE2017-baseline-system-master-gpu/dcase_framework/__init__.py", line 3, in <module>
from . import application_core
File "/home/zoe_env/DCASE2017-baseline-system-master-gpu/dcase_framework/application_core.py", line 129, in <module>
import sed_eval
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/sed_eval/__init__.py", line 5, in <module>
from . import sound_event
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/sed_eval/sound_event.py", line 212, in <module>
from . import util
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/sed_eval/util/__init__.py", line 41, in <module>
from .event_list import *
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/sed_eval/util/event_list.py", line 7, in <module>
import dcase_util
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/dcase_util/__init__.py", line 6, in <module>
from . import containers
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/dcase_util/containers/__init__.py", line 949, in <module>
from .audio import *
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/dcase_util/containers/audio.py", line 11, in <module>
import librosa
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/__init__.py", line 12, in <module>
from . import core
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/core/__init__.py", line 104, in <module>
from .time_frequency import * # pylint: disable=wildcard-import
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/core/time_frequency.py", line 10, in <module>
from ..util.exceptions import ParameterError
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/util/__init__.py", line 67, in <module>
from .utils import * # pylint: disable=wildcard-import
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/util/utils.py", line 111, in <module>
def valid_audio(y, mono=True):
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/cache.py", line 49, in wrapper
if self.cachedir is not None and self.level >= level:
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/joblib/memory.py", line 847, in cachedir
DeprecationWarning, stacklevel=2)
TypeError: expected string or buffer
百度发现,有人提出是librosa 在导入的时候,出现错误,import librosa进行验证
[zoe_env@218 examples]$ python
Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import librosa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/__init__.py", line 12, in <module>
from . import core
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/core/__init__.py", line 104, in <module>
from .time_frequency import * # pylint: disable=wildcard-import
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/core/time_frequency.py", line 10, in <module>
from ..util.exceptions import ParameterError
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/util/__init__.py", line 67, in <module>
from .utils import * # pylint: disable=wildcard-import
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/util/utils.py", line 111, in <module>
def valid_audio(y, mono=True):
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/librosa/cache.py", line 49, in wrapper
if self.cachedir is not None and self.level >= level:
File "/home/zoe_env/anaconda2/lib/python2.7/site-packages/joblib/memory.py", line 847, in cachedir
DeprecationWarning, stacklevel=2)
TypeError: expected string or buffer
验证,是由于librosa的问题
虽然不知道为什么,但是解决方法:joblib卸载0.12.0版本,安装0.11.0版本
pip uninstall joblib==0.12.0
pip install joblib==0.11.0
问题解决!