Skip to content

AttributeError: 'NoneType' object has no attribute 'endswith' #12

Description

@thierryjanssens

Hi,

I run into the following error when I want to concatenate a bunch of svg files as follows

svg_stack.py --direction=v --margin=100 Figure\ S1.svg Figure\ S2.svg Figure\ S3.svg Figure\ S4.svg Figure\ S5.svg Figure\ S6.svg Figure\ S7.svg Figure\ S8.svg Figure\ S9.svg Figure\ S10.svg Figure\ S11.svg Figure\ S12.svg Figure\ S13.svg Figure\ S14 Figure\ S15.svg Figure\ S16 > Figures_SI.svg
Traceback (most recent call last):
File "/home/.conda/envs/svg/bin/svg_stack.py", line 713, in
main()
File "/home/.conda/envs/svg/bin/svg_stack.py", line 706, in main
layout.addSVG(fname,alignment=AlignCenter)
File "/home/janssetk/.conda/envs/svg/bin/svg_stack.py", line 632, in addSVG
svg_file = SVGFile(svg_file)
File "/home/.conda/envs/svg/bin/svg_stack.py", line 181, in init
height, height_units = get_unit_attr(self._root.get('height'))
File "/home/.conda/envs/svg/bin/svg_stack.py", line 44, in get_unit_attr
if value.endswith(unit_name):
AttributeError: 'NoneType' object has no attribute 'endswith'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions