PShape Error Fatal Error :1:1:

Hi I’m trying to use Pshape with this code

PShape planet;

void setup(){
  size(600,600);
  planet = loadShape("sphere.svg");
}

void draw(){
  background(0);
  shape(planet, 250,250,150,100);
}

and I’ve got this error

<org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Contenu non autorisé dans le prologue.>

it’s possible there is either a problem with your svg or the limited support for svg files is preventing you from loading the file. it looks more likely it is the former and it’s probably worth trying another svg

1 Like

I tried with another svg and its works thanks its was because the other svg i has an errror during the encoding thx