Jump to content
UltiMaker Community of 3D Printing Experts

Running CuraEngine from command line, returns empty GCode file


BiLeVi
 Share

Recommended Posts

Posted · Running CuraEngine from command line, returns empty GCode file

I have been attempting to get CuraEngine running from the command line in order to use an interactive python script with it through the subprocess import that python has. I call the directory that Ultimaker Cura is in, then type in the argument:

 

CuraEngine slice -v -p -j C:/Users/blv/Cura/resources/definitions/ultimaker2.def.json -o C:\Users\blv\Desktop\200_stars.gcode -l C:\Users\blv\Desktop\stl files\200_stars.stl

 

I get the output file 200_stars.gcode, but when I open it, its completely empty!

 

There are errors/warnings that pop up within the command prompt, which state:


[WARNING] JSON setting zig_zaggify_support has no default_value!
[ERROR] Couldn't find definition file with ID: ultimaker2_extruder_0
[ERROR] Couldn't open JSON file:
[WARNING] JSON setting machine_end_gcode has no default_value!
[WARNING] Unrecognized data type in JSON setting machine_head_with_fans_polygon

[WARNING] Unable to recognize the extension of the file. Currently only .stl and .STL are supported.[ERROR] Failed to load model: C:\Users\blv\Desktop\stl. (error number 0)

 

I believe that the empty GCode output is a result of the JSON file not being read properly, but I do not know how to get it to open and read correctly.

 

Any help would be greatly appreciated!

 

 

  • Link to post
    Share on other sites

    Posted · Running CuraEngine from command line, returns empty GCode file

    Hey @BiLeVi,

     

    Welcome to the Ultimaker Community 🎉


    Personallly I'm not very skilled with running from the engine command line, and most of the Cura Developers can be found on the Github https://github.com/Ultimaker/Cura

    But I can ask someone from the team to take a look for you. 🤞

  • Link to post
    Share on other sites

    Posted · Running CuraEngine from command line, returns empty GCode file

    The best way to overcome these problems is to create a folder that includes all files needed including the .stl file and a little batch file for running the slicer engine.

     

    Looking on your errors there are missing:

    ultimaker2_extruder_0.def.json,

    in addition you need:

    ultimaker.def.json,

    fdmextruder.def.json

     

    Here is an litte example, extract the folder Test to your Desktop and run batch file SliceUM2.bat in cmd window:

    Test.zip

  • Link to post
    Share on other sites

    Posted · Running CuraEngine from command line, returns empty GCode file

    I think you're using the wrong slashes. You use / slashes in one part and \ in the other. Windows is a bit peculiar about that 😉

  • Link to post
    Share on other sites

    Posted (edited) · Running CuraEngine from command line, returns empty GCode file

    I might be wrong, but shouldn't you have quotation marks around the STL file path? There's a space in it

     

    C:\Users\blv\Desktop\stl files\200_stars.stl

                                               ^

                                       right here

    Edited by Nosybottle
  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 14 replies
    ×
    ×
    • Create New...