How to collect all sequences for only one line result in a fasta file

I'm trying to find all the chromosomes only in a fast file and make the DNA to rna then get the first ORF so that I can finally transfer it to protein. Here is my code :

from Bio.Seq import Seq
from Bio import SeqIO
import re
s=''
for record in SeqIO.parse("Rosomary-r6.17.fasta","fasta"):
    if not re.match('^>',record):
        s=s+record
        dna=Seq(s)
        rna=dna.transcribe()
        get=re.search('AUG([AUGC]{3})+?(UAA|UAG|UGA)',str(rna))
        orf=get.group()
        orf1=Seq(orf)
        protein=orf.translate()
        print(protein)

However, I keep getting this error:

   MGDTDSGDI*
   MGDTDSGDI*
   MGDTDSGDI*
   MGDTDSGDI*
...

What should I do in this case to solve this ISSUE? I only need one line of the result. Thank you!

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum