Either the task scheduler is running it as a user which doesn't have the permissions it needs, or it is running it without setting the environment variables that Python needs to execute correctly.
If you have your batch script run
python script.py >log.txt
... then you should get a log file created that you can inspect and hopefully that will have an informative message.