Volume not found when creating physical group
Hello,
I'm new to gmsh and I'm building a model of a lunar lander. I started by using the .geo scripting language, but I since switched to using the Python API. I'm having trouble when I'm assigning physical groups at the end of my program, I go to get the surfaces of a volume but I get an error saying the volume doesn't exist (Error : Volume 12 does not exist). But, the volume does exist in the model.
I think it has something to do with calling .synchronize() in line 183, but I'm not sure. Also, I'm sure the way I'm programming isn't following best practices, so any feedback there would be appreciated :-)
Thanks in advance,