http://raspberrypi.werquin.com/post/518 ... zo-raspcam
However, I'm using Apache2. I installed mod_python and can get a simple "Hello World" to work. So far, so good.
However, I get a "CalledProcessError: Command 'raspistill -o /run/shm/img.jpg -t 0' returned non-zero exit status 25" error when trying to run the following script. Can anyone assist?
Code: Select all
#!/usr/bin/python
import sys
import subprocess
import os
try:
os.remove("/run/shm/img.jpg")
except OSError:
pass
error = subprocess.check_output("raspistill -o /run/shm/img.jpg -t 0", shell=True, stderr=subprocess.STDOUT)
sys.stdout.write( "Content-Type: image/jpeg;\n\n" + file("/run/shm/img.jpg","rb").read() )