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

Delayed path parsing, for partial paths can be None. #245

Open
tatarize opened this issue Feb 13, 2024 · 2 comments
Open

Delayed path parsing, for partial paths can be None. #245

tatarize opened this issue Feb 13, 2024 · 2 comments

Comments

@tatarize
Copy link
Member

Delayed path parsing for partial paths could relay None data and cause a crash.

@tatarize
Copy link
Member Author

May be fixed with:

    def parse(self, parser, pathd):
        if pathd is None:
            return

@dojoe
Copy link
Contributor

dojoe commented Apr 27, 2024

Just happened to me - apparently Inkscape uses special attributes for arcs instead of a d attribute:

    <path
       style="fill:#ff9955;stroke-width:4.00000007;stroke:#ff0000"
       id="path8"
       sodipodi:type="arc"
       sodipodi:cx="828.69006"
       sodipodi:cy="522.49927"
       sodipodi:rx="89.827477"
       sodipodi:ry="92.376137"
       sodipodi:start="0"
       sodipodi:end="1.9988103"
       sodipodi:open="true"
       sodipodi:arc-type="arc" />

My fix was to make sure the None gets turned into an empty string - that gets rid of the crash but of course the path is empty. Long term I'm thinking about parsing those sodipodi attributes into a proper Arc.

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