SUC-DriverOld / MSST-WebUI

Music Source Separation Training Inference Webui, besides, we packed UVR together!
GNU Affero General Public License v3.0
45 stars 9 forks source link

Update FFMPEG and PYTHON paths for different operating systems #12

Closed magic-akari closed 1 month ago

SUC-DriverOld commented 1 month ago

Thank you for your contribution!

SUC-DriverOld commented 1 month ago

感谢您的代码贡献!经测试下来,发现当python路径存在空格时,使用PYTHON=sys.executable,执行重启webui命令时存在bug:

(base) E:\vs\MSST: can't open file 'E:\\vs\\MSST WebUI\\WebUI\\workenv\\python.exe': [Errno 2] No such file or directory

此错误会影响到将此程序安装在Program Files路径下的用户

现已将此行代码修改至

PYTHON = ".\\workenv\\python.exe" if os.path.isfile(".\\workenv\\python.exe") else sys.executable
magic-akari commented 1 month ago

如果是这样的话,在其他系统上,如果 python 路径带空格(虽然不太可能)也可能面临同样的问题。 我觉得需要重新考虑一下 subprocess.run 的传参方式。