i am trying to program a code that will capture image from thecamera through a webpage by using python and flask server but i amgetting some errors
the webpage works fine but when i press capture it breaks andgives me error
here is the code and i highlighted where the error is and therest is correct:
from flask import Flask, render_template, request, redirect,url_for, make_response
import abd
import RPi.GPIO as GPIO
import picamera #import PiCamera
#from time import sleep
app = Flask(__name__)
app._static_folder = “/home/pi/hope”
@app.route(‘/’)
def index():
returnrender_template(‘index.html’)
@app.route(‘/<changepin>’, methods=[‘POST’])
def reroute(changepin):
changePin =int(changepin)
if changePin ==1:
abd.stop()
elif changePin ==2:
abd.left()
elif changePin ==3:
abd.right()
elif changePin ==4:
abd.forward()
elif changePin ==5:
abd.reverse()
elif changePin ==9:
abd.up()
elif