svg_stack icon indicating copy to clipboard operation
svg_stack copied to clipboard

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

Open thierryjanssens opened this issue 6 years ago • 1 comments

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'

thierryjanssens avatar Jun 13 '19 10:06 thierryjanssens

(Apologies for my delay.)

I think this may have been fixed by #14. Can you check this by running on the current main branch?

astraw avatar Mar 13 '21 08:03 astraw