[reportlab-users] Run time error with version 3.4

Peter Cock p.j.a.cock at googlemail.com
Thu May 18 09:44:45 EDT 2017


That in itself is a typo, RunTimeError should be RuntimeError
which is a built in exception in Python (lower case t).

However, that won't solve the underlying problem which is something
about class instances which can only be solved once?

Peter

On Thu, May 18, 2017 at 2:35 PM, lizhe Xu via reportlab-users
<reportlab-users at lists2.reportlab.com> wrote:
> My colleague sent me a python script which he is using frequently and no
> problem or error. I don't know which version of reportlab he uses but it's
> not the latest verison 3.4. When I got it and run on my Mac with Python 2.7
> and the latest version of Reportlab 3.4, I got the following error:
>
>
> Traceback (most recent call last):
> File "/Volumes/Data/Python_Analysis/VIralDirectBlast4newModified.py", line
> 815, in <module>
>   IterateVirusFile(FileID,
> "/Volumes/Data/Python_Analysis/IBRS2201702/ViralCompleteGenome60559_160818.fasta")
> File "/Volumes/Data/Python_Analysis/VIralDirectBlast4newModified.py", line
> 304, in IterateVirusFile
>   BlastSequencesV29("/Volumes/Data/Python_Analysis/VirusQue.fasta",
> "blastn", ViralQueID, FileID)
> File "/Volumes/Data/Python_Analysis/VIralDirectBlast4newModified.py", line
> 474, in BlastSequencesV29
>    draw_genome(FileID)
> File "/Volumes/Data/Python_Analysis/VIralDirectBlast4newModified.py", line
> 546, in draw_genome
>    c.save()
> File "/usr/local/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py",
> line 1237, in save
>    self._doc.SaveToFile(self._filename, self)
> File "/usr/local/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py",
> line 211, in SaveToFile
>    raise RunTimeError("class %s instances can only be saved once" %
> self.__class__.__name__)
> NameError: global name 'RunTimeError' is not defined
> [Finished in 132.485s
>
>
> Please help to fix the problem. Thanks.
>
>
>
> Lz
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>


More information about the reportlab-users mailing list