Failed to create Toolpath error when generating G-Code

Be sure your machine model is correctly set up.
I remember a a similar issue where the model size was too big (eventually the rectangle around the primary model), try to resize it.