Re: Run time error with version 3.4
Peter Cock via reportlab-users <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <CAKVJ-_71Yz5J1w7-fi4MHohxfjCnDTeBokntmXjaCVfA9SGSVQ@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://pairlist2.pair.net/mailman/listinfo/reportlab-users >