PermissionError:[Errno 13]权限被拒绝失败

时间:2020-01-04 16:47:59

标签: python

我以前从未使用过python,我想构建一个在github上找到的项目,但是2个小时我都没有解决问题。我认为单独安装所有软件包不是问题。我已经应用了他叙述的所有必要文档,但是当我运行以下命令时,出现错误如何解决此错误?

https://github.com/tsurumeso/vocal-remover

运行

 python inference.py --input C:\Users\Berkay\Desktop\vocal-remover

错误输出

PS C:\Users\Berkay\Desktop\vocal-remover> python inference.py --input C:\Users\Berkay\Desktop\vocal-remover             loading model... done
C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py:146: UserWarning: PySoundFile failed. Trying audioread instead.
  warnings.warn('PySoundFile failed. Trying audioread instead.')
loading wave source... Traceback (most recent call last):
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 129, in load
    with sf.SoundFile(path) as sf_desc:
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 629, in __init__
    self._file = self._open(file, mode_int, closefd)
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 1184, in _open
    "Error opening {0!r}: ".format(self.name))
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 1357, in _error_check
    raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening 'C:\\Users\\Berkay\\Desktop\\vocal-remover': System error.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "inference.py", line 39, in <module>
    args.input, args.sr, False, dtype=np.float32, res_type='kaiser_fast')
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 147, in load
    y, sr_native = __audioread_load(path, offset, duration, dtype)
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 171, in __audioread_load
    with audioread.audio_open(path) as input_file:
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\audioread\__init__.py", line 111, in audio_open
    return BackendClass(path)
  File "C:\Users\Berkay\AppData\Local\Programs\Python\Python37\lib\site-packages\audioread\rawread.py", line 62, in __init__
    self._fh = open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Berkay\\Desktop\\vocal-remover'

2 个答案:

答案 0 :(得分:1)

我找到了解决问题的方法。

错误


 python inference.py --input C:\Users\Berkay\Desktop\vocal-remover

是的


python inference.py --input C:\Users\Berkay\Desktop\vocal-remover\music.mp3

答案 1 :(得分:0)

我认为问题在于您的输入是一个目录,而我敢打赌它应该是一些音频文件。您应该这样做:

inference.py --input path/to/your/audio.wav