I have an app in Flask that is working perfectly fine in my computer, when I tried to run it in pythonanywhere, I get a "500 internal server error". The HTML source is like this: <img src="{{ url_for('video_feed', id=id )}}" The python code:
@app.route("/video_feed/<id>", methods=['GET']) def video_feed(): global indexes, playPause # return the response generated along with the specific media # type (mime type) return Response(video_player(id), mimetype = "multipart/x-mixed-replace; boundary=frame")
The function video_player()
def video_player(id): global lock
while True:
with lock:
(flag, encodedImage) = cv2.imencode(".jpg", marco[Clientes[id].nroFrame])
yield(b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + bytearray(encodedImage) + b'\r\n')
Any ideas??