With newer versions of blender (>4) the following adjustments can be made to blenderScript.py:
parser.add_argument("--input") # Syntax change
parser.add_argument("--output")
def render(x: Path):
# Updated import function to the new API call. Not sure what an equivalent would be, but this works.
bpy.ops.wm.obj_import(filepath=str(x))
bpy.context.scene.render.filepath = params["output"]