Skip to content

py3 Error: isinstance(Length, paragraph_format.line_spacing) #297

@waterdr0p

Description

@waterdr0p

https://python-docx.readthedocs.io/en/latest/user/text.html

Line spacing

from docx.shared import Length
paragraph_format.line_spacing
None
paragraph_format.line_spacing_rule
None

paragraph_format.line_spacing = Pt(18)
isinstance(Length, paragraph_format.line_spacing)

In [20]: isinstance(Length, pfmt.line_spacing)

TypeError Traceback (most recent call last)
in ()
----> 1 isinstance(Length, pfmt.line_spacing)

TypeError: isinstance() arg 2 must be a type or tuple of types
In [23]: type(Length)
Out[23]: type

In [24]: type(pfmt.line_spacing)
Out[24]: docx.shared.Twips

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions