pycallgraph2 icon indicating copy to clipboard operation
pycallgraph2 copied to clipboard

GraphViz output file name truncated if it contains space

Open haael opened this issue 5 months ago • 0 comments

If the output file name provided to GraphViz contains space character, only the part up to the space ends up as the file name. Workaround involves taking file name into quotes. This is also a potential security vunerability.

profiler = PyCallGraph(output=GraphvizOutput(output_file="name with spaces.png"))
profiler.start()
...
profiler.done()

Workaround:

profiler = PyCallGraph(output=GraphvizOutput(output_file="\"name with spaces.png\""))

haael avatar Mar 16 '24 15:03 haael