pombreda / rst2pdf

Automatically exported from code.google.com/p/rst2pdf
Other
0 stars 0 forks source link

AttributeError: MyImage instance has no attribute '_restrictSize' #450

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. rst2pdf test.rst -o test.pdf --use-floating-images
2.
3.

What is the expected output? What do you see instead?

test.rst:4: (ERROR/3) Unknown target name: "restructuredtext".
Traceback (most recent call last):
  File "/usr/bin/rst2pdf", line 9, in <module>
    load_entry_point('rst2pdf==0.91', 'console_scripts', 'rst2pdf')()
  File "/usr/lib/python2.7/site-packages/rst2pdf/createpdf.py", line 1446, in main
    compressed=options.compressed)
  File "/usr/lib/python2.7/site-packages/rst2pdf/createpdf.py", line 639, in createPdf
    pdfdoc.multiBuild(elements)
  File "/usr/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 960, in multiBuild
    self.build(tempStory, **buildKwds)
  File "/usr/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 880, in build
    self.handle_flowable(flowables)
  File "/usr/lib/python2.7/site-packages/rst2pdf/createpdf.py", line 747, in handle_flowable
    if frame.add(f, canv, trySplit=self.allowSplitting):
  File "/usr/lib/python2.7/site-packages/rst2pdf/flowables.py", line 552, in add
    return Frame.add(self, flowable, canv, trySplit)
  File "/usr/lib/python2.7/site-packages/reportlab/platypus/frames.py", line 159, in _add
    w, h = flowable.wrap(aW, h)
  File "/usr/lib/python2.7/site-packages/reportlab/platypus/flowables.py", line 1055, in wrap
    wI, hI = I._restrictSize(availWidth,availHeight)
AttributeError: MyImage instance has no attribute '_restrictSize'

Please answer the following questions, they are *very* important:

* Version of rst2pdf?
0.91
* Version of reportlab?
2.5
* Are you using wordaxe, and if true, what version?
no
* Are you using rst2pdf with Sphinx, and if true, what version?

Please provide any additional information below.

Original issue reported on code.google.com by ggd...@gmail.com on 5 May 2012 at 11:59

Attachments:

GoogleCodeExporter commented 9 years ago
It doesn't fail for me, see attachment, but I have only tested it with 
reportlab 2.4, I will try 2.5 later.

Original comment by roberto.alsina on 26 May 2012 at 1:45

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by roberto.alsina on 26 May 2012 at 2:14