Skip to content

Print to PDF: AttributeError: 'NoneType' object has no attribute 'getContentsMargins' #80

@PierreRaybaut

Description

@PierreRaybaut

How to test?

Run the Bode diagram demo.
Click on "Print" button and save to PDF.

Traceback (most recent call last):
  File "C:\Dev\Libre\PythonQwt\qwt\tests\test_bodedemo.py", line 259, in print_
    renderer.renderTo(self.plot, printer)
  File "C:\Dev\Libre\PythonQwt\qwt\plot_renderer.py", line 321, in renderTo    
    self.render(plot, p, rect)
  File "C:\Dev\Libre\PythonQwt\qwt\plot_renderer.py", line 359, in render      
    left, top, right, bottom = plot.layout().getContentsMargins()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'getContentsMargins'   

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions