Buğra Kara
Buğra Kara

Reputation: 31

PermissionError: [Errno 13] Permission denied failure

I have never used python before and I want to build a project I found on github but I have not solved a problem there for 2 hours. I don't think it's a problem that I've installed all the packages individually. I've applied all the necessary documents that he narrates, but when I run the following command, I get an error How can I solve this error?

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

Run

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

error output

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'

Upvotes: 0

Views: 4639

Answers (2)

Dawid Gacek
Dawid Gacek

Reputation: 557

I think the problem is that your input is a directory, while I bet it should be some audio file. You should do:

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

Upvotes: 0

Buğra Kara
Buğra Kara

Reputation: 31

I found the solution to the problem.

False


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

That's right


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

Upvotes: 1

Related Questions