Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

[WinError 2] The system cannot find the file specified still happens #13

Open
MRrollingJerry opened this issue Jul 19, 2018 · 5 comments

Comments

@MRrollingJerry
Copy link

MRrollingJerry commented Jul 19, 2018

I used the code in the tutorial:

from pysndfx import AudioEffectsChain

fx = (
    AudioEffectsChain()
    .highshelf()
    .reverb()
    .phaser()
    .delay()
    .lowshelf()
)

infile = 'C:/Users/user/Desktop/test\\000D3D330B1371EB.wav'
outfile = 'C:/Users/user/Desktop/test\\000D3D330B1371EB.wav'

fx(infile, outfile)

But the file can never be found.

pysndfx and fox are both up to date. It seems the error comes at the subprocess.Popen.

@carlthome
Copy link
Owner

carlthome commented Jul 19, 2018

Could you try again but make sure outfile is different from infile?

Also, try this sanity check:

import os

assert os.path.isfile('C:/Users/user/Desktop/test\\000D3D330B1371EB.wav')

@MRrollingJerry
Copy link
Author

MRrollingJerry commented Jul 19, 2018

Thanks for the advice. I changed outfile to 'C:/Users/user/Desktop/save\000D3D330B1371EB.wav'
and made sure the wav file is at the address I mention in infile, but it still gives me the error, 'could not find the file specified'.

btw the error is towards infile

@wangtiance
Copy link

Hello @MRrollingJerry , in case you still need the solution, I think it's possibly because you don't have SoX installed on windows, or did not add its path to the system. The error is caused by not finding sox.exe, instead of not finding the input file.

@iamgoinghomenow
Copy link

sox not in path solved it for me.

@MinaBabahaji
Copy link

Hi, did you find the solution? I have faced this problem too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants