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
OS Error when importing #4
Comments
This is mainly a problem with CairoSVG. I'm not sure why it's failing to load. drawSvg should have just disabled the image rasterization functionality when Cairo failed to load. I've updated the library do this. |
TL;DR: CairoSVG not installed is not always the case when the error message shows when rendering and the warning after importing drawSVG: https://github.com/cduck/drawSvg/blob/5d6177a51c430e644bb4b714216977a1af92e29e/drawSvg/raster.py#L9 RuntimeWarning: CairoSVG will need to be installed to rasterize images: Install with `pip3 install cairosvg`
warnings.warn(msg, RuntimeWarning) The error message provided when an |
Thanks for pointing out the misleading error message. It looks like there should be separate I'll make sure this is fixed by the next release. Do you want to take a shot at fixing this and submit a pull request? |
What happened?This is my first time using drawSvg. I followed the project description to get started but ran into the same error message that jpach01 saw. Steps to ReproduceOperating system: macOS Mojave (10.14.6)
Detailed DescriptionAfter reading jpach01's issue on CairoSvg, I installed cairo on my macOS using |
This is fixed in version 1.3.1. |
I just installed this package. When importing as in your example I get the following error:
I've also attempted to fix by explicitly pip installing cairosvg with no change in the error.
The text was updated successfully, but these errors were encountered: