Skip to content

shell: UnboundLocalError when save to png/bmp/jpg #133

@pthr

Description

@pthr

In shell/commands.py, save mehod. A PdfPlotGraphicsContext instance is used to save to pdf, and the same object is used in the code to save to png/bmp/jpg (can be used to save to png/bmp/jpg at all?), however in that case the instance is not created because that's done in if ext == ".pdf". Therefore a save('chacoplot.png') will result in a UnboundLocalError: local variable 'gc' referenced before assignment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions