php-obfuscator icon indicating copy to clipboard operation
php-obfuscator copied to clipboard

Can't open file or directory in windows

Open alimashalkpu opened this issue 1 year ago • 2 comments

I tried many ways absolute path or file system path none of them worked

alimashalkpu avatar Dec 02 '24 10:12 alimashalkpu

Same problem here. Get the error [WinError 2] The system cannot find the file specified upon using any form of path on windows. Even through WSL is it giving the same errors.

jusjus112 avatar Dec 29 '24 10:12 jusjus112

Same problem here too, with the error [WinError 2] The system cannot find the file specified using the program.

OMANIAOZANIA avatar Mar 31 '25 16:03 OMANIAOZANIA

Guys,

main.py expects the path to the YakPro‑Po executable to be specified in config.py. Lines 9‑11 of config.py still contain a placeholder path:

 YAKPRO = [os.path.expanduser("/home/YOUR_USERNAME/PROJECT_DIR/yakpro-po/yakpro-po.php"), "-o"]

The README emphasizes that you must update this path to match where YakPro-Po is installed:

:warning: **Important:** The paths specified in `config.py` (especially YAKPRO) are correct and point to the YakPro-Po obfuscator on your system.

If YAKPRO points to a nonexistent location, Python tries to run that file and you get [WinError 2] The system cannot find the file specified.

So edit config.py so that YAKPRO contains the full path to yakpro-po.php on your machine.

For example:

YAKPRO = [r"C:\Users\YourName\yakpro-po\yakpro-po.php", "-o"]

(or the equivalent WSL path if running under WSL). After adjusting the path, run the script again (python main.py or bash start.sh). This should prevent the “file not found” error.

Also If you plan to use start.sh instead of python main.py, ensure that its path to main.py is also correct:

1  #!/bin/bash
2  python3 /home/YOUR_USERNAME/path/to/your/script/main.py

After updating these paths, rerun the script. This should resolve the “[WinError 2] The system cannot find the file specified” error.

Regards, Martin

mnestorov avatar Jun 04 '25 12:06 mnestorov