I am trying to run python files in Laravel Project.Therefore, i use the Symfony\Process package.My code looks like this:
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
$process = new Process(["python","C:\xampp\htdocs\backend\Scrape\AnnouncementsScrape.py"]);
$process->run();
When i use this line:
throw new ProcessFailedException($process);
my laravel project returns error (I use laravel framework for my backend in my mobile app, so i can not see the exactly error; i can only see that there is problem with my backend)
Το sum up, i run the code above, but the Process is not successfull. I check it with the condition:
if ($process->isSuccessful())
Anyone any idea?