Editing user-submitted PDF with PyMuPDF then making it available for download

New dilemma- The above works fine on its own, but seems to break if I try to do it multiple times in a row. If I try to put something like:

for n in range(len(actor_list)):
   with fitz.open(stream=script.read(), filetype="pdf") as pdf_file:

It works for the first pass, but then I get EmptyFileError: cannot open empty document. Any idea why that may be?