(BadRequestKeyError) Don’t know where the problem is

Solution
def signup():
    if request.method == "POST":
        # ...