My repl can't write HTTP image response binary to directory image

Question: So a while ago, I made a progress bar repl. Now I’ve added 2 more “widgets”, but one of doesn’t work, it’s called the “frame “widget””. It’s supposed to save an image from HTTP (I use, make a new image with a background color of the color HTTP argument with the image’s height and width + the width attribute, paste the HTTP image at the middle of the image, and then save it and return it as output, but I became stuck at the point of just the HTTP writing part, but why?

Repl link: turtle - Python Repl - Replit

from flask import *
from PIL import Image, ImageDraw
import configparser
import requests as http

maintenance = configparser.ConfigParser()"status.ini")
maintenance = not maintenance.getboolean("STATUS", "normal")
app = Flask("turtle")
maintenanceApp = Flask("maintenance")

def progressBar():
	if "height" not in request.args or not request.args["height"].isdigit() or "percent" not in request.args or not request.args["percent"].isdigit():
		return abort(400)
	width = 102
	height = int(request.args["height"]) + 2
	img = ImageDraw.Draw("RGB", (width, height), "Black"))

	img.rectangle([(1, 1), (100, height - 2)], fill="White")
	if int(request.args["percent"]) > 0 and int(request.args["percent"]) < 101:
		img.rectangle([(1, 1), (int(request.args["percent"]), height - 2)], fill="#42d46d")
	elif int(request.args["percent"]) > 100:
		return abort(400)
	if "text" in request.args and height > 11:
		img.text((2, 0), request.args["percent"] + "%", fill="Black")"/home/runner/turtle/progress.png")
	return send_file("/home/runner/turtle/progress.png")

def checkBox():
	img = ImageDraw.Draw("RGB", (10, 10), "Black"))
	img.rectangle([(1, 1), (8, 8)], fill="White")
	if "checked" in request.args:
		if "solid" not in request.args:
			img.line((1, 5, 2, 5), fill="ForestGreen", width=1)
			img.line((2, 5, 4, 8), fill="ForestGreen", width=1)
			img.line((4, 8, 8, 1), fill="ForestGreen", width=1)
			img.rectangle([(1, 1), (8, 8)], fill="ForestGreen")
		if "solid" not in request.args:
			img.line((1, 1, 8, 8), fill="Crimson", width=1)
			img.line((1, 8, 8, 1), fill="Crimson", width=1)
			img.rectangle([(1, 1), (8, 8)], fill="Crimson")"/home/runner/turtle/check.png")
	return send_file("/home/runner/turtle/check.png")

def frame():
	if "img" not in request.args or "width" not in request.args or "color" not in request.args:
		return abort(400)
	open("/home/runner/turtle/frame/original.png", "wb").write(bytes(http.get(request.args["img"]).text, "utf-8"))
	original ="/home/runner/turtle/frame/original.png")
	img = ImageDraw.Draw("RGB", (original.width + int(request.args["width"]), original.height + int(request.args["width"])), request.args["color"]))
	img.paste(original, (int(request.args["width"]), int(request.args["width"])))"/home/runner/turtle/frame/framed.png")
	return send_file("/home/runner/turtle/frame/framed.png")

def onMaintenance(path=None):
	return send_file("/home/runner/turtle/maintenance.png")

if not maintenance:"", port=8080)
else:"", port=8080)