# loadShape() throwing error when loading svg

**URL:** <https://discourse.processing.org/t/loadshape-throwing-error-when-loading-svg/9223>\
**Category:** Coding Questions\
**Created:** [March 12, 2019, 9:40am UTC](https://discourse.processing.org/t/loadshape-throwing-error-when-loading-svg/9223 "2019-03-12T09:40:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charly4710](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@charly4710](https://discourse.processing.org/u/charly4710)\
**Post date:** [March 12, 2019, 9:40am UTC](https://discourse.processing.org/t/loadshape-throwing-error-when-loading-svg/9223/1 "2019-03-12T09:40:48Z")

</div>

Hi,

I struggle with loadshape() when loading certain svg files. the files are created in [icograms.com](http://icograms.com), and are perfectly readable in browsers and in inkscape.

> parsed: m,51.4,41.9,c,0,.1,-.1.2,-.2.1,s,-.2,-.2,-.2,-.4.1,-.2.2,-.1,c  
> unparsed: .1.2.2.3.2.4,z  
> RuntimeException: shape command not handled: .1.2.2.3.2.4

It appears that loadshape works fine for certain elements of the svg, but when I add certain other elements, it throws error. In the below example it throws error because of the fountain. When I load the same svg with just the green, it works fine.

I run on processing 3.5.3 on windows 10.

My (highly complex) code:

> void setup() {  
> size(1000, 1000);  
> background(255);  
> noLoop();  
> }
> 
> void draw() {  
> PShape test;  
> test = loadShape(“1.svg”);  
> shape(test,10,10);  
> }

The SVG in question you find here:  
[https://drive.google.com/file/d/1o5CeJceIz3jkNo644APrIxdaMHoPxr9\_/view?usp=sharing](https://drive.google.com/file/d/1o5CeJceIz3jkNo644APrIxdaMHoPxr9_/view?usp=sharing)

Appreciate any thoughts on how to solve this.

thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 12, 2019, 10:29am UTC](https://discourse.processing.org/t/loadshape-throwing-error-when-loading-svg/9223/2 "2019-03-12T10:29:03Z")

</div>

-a- yes here same  
-b- but there is something strange with that file,  
i open it in a online editor and see that:

 ![SNAG-0003](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0432cfe5356a674586b006fc1be763aeed8d2b34.jpeg)  
left down playground picture?  
this is not shown if you just view it…  
the different programs can not all features, mostly ignore it,  
ending as a warning in processing, but that seems to be a bad one

could you just download as a png and use PImage?  
or convert it?  
worst case view it and make a screen shot…
