jbn / IPlantUML

A Python package which defines a PlantUML cell magic for IPython.
MIT License
95 stars 28 forks source link

Error when using "plantuml.jar" #10

Closed jpe3002 closed 6 years ago

jpe3002 commented 6 years ago

Hello and thanks for a nice plugin. Have an issue when using "plantuml.jar".

From the code:

try:
    output = None
    if use_web:
        output = plantuml_web(uml_path)
    else:
        plantuml_path = os.path.abspath(args.plantuml_path or PLANTUMLPATH)
        plantuml_exec(uml_path, plantuml_path=plantuml_path)
    svg_name = output[0]
    return SVG(filename=svg_name)
finally:

When "use_web" is "false" the output variable will be "None" meaning that there will be an exception on line:

svg_name = output[0]

Suggests that the line above is changed to:

        output = plantuml_exec(uml_path, plantuml_path=plantuml_path)