Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plt_draw_text can raise AttributeError on SVG Text nodes #23

Open
szmoore opened this issue Jul 23, 2020 · 1 comment
Open

plt_draw_text can raise AttributeError on SVG Text nodes #23

szmoore opened this issue Jul 23, 2020 · 1 comment

Comments

@szmoore
Copy link

szmoore commented Jul 23, 2020

Calling load on a SVG file with <text ...> nodes

  File "/usr/local/lib/python3.7/dist-packages/pylustrator/parse_svg.py", line 643, in parseGroup
    patch_list.append(plt_draw_text(child, trans, style, ids, no_draw=no_draw))
  File "/usr/local/lib/python3.7/dist-packages/pylustrator/parse_svg.py", line 330, in plt_draw_text
    text_content += child.firstChild.nodeValue
AttributeError: 'NoneType' object has no attribute 'nodeValue'

This PR would fix it but I'm not sure if it would break the original use case, which might have been parsing a very different file.
szmoore#1

@rgerum
Copy link
Owner

rgerum commented Aug 17, 2020

Unfortunately you opened the pull request on your fork and not on the original repository, so I cannot merge it. Could you please try to make the pullrequest on the main repository and not on your fork? Then I would like to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants