question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pytest profiling-svg doesn't work on python 2.7

See original GitHub issue

pytest --profiling work perfectly on python2.7 but the option --profiling-svg doesn’t work. The profiling report is generated but the svg isn’t . The error trace is : test/test_standalone.py ..sh: 2: dot: not found Traceback (most recent call last): File "/home/aurelien/virtual_env/hotcountenv/bin/gprof2dot", line 11, in <module> sys.exit(main()) File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3319, in main dot.graph(profile, theme) File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3065, in graph arrowsize = "%.2f" % theme.edge_arrowsize(weight), File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3093, in edge self.attr_list(attrs) File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3110, in attr_list self.id(value) File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3123, in id self.write(s) File "/home/aurelien/virtual_env/hotcountenv/lib/python2.7/site-packages/gprof2dot.py", line 3147, in write self.fp.write(s) IOError: [Errno 32] Broken pipe

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kalefranzcommented, May 4, 2018

conda install graphviz fixed this for me.

1reaction
emorikawacommented, Feb 27, 2018

I was able to just run everything manually to get around this:

gprof2dot -f pstats prof/combined.prof | dot -Tsvg -o prof/combined.svg

Note on OSX I had to first brew install graphviz to get the dot cli arg.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytest profiling-svg doesn't work on python 2.7 #70 - GitHub
pytest --profiling work perfectly on python2.7 but the option --profiling-svg doesn't work. The profiling report is generated but the svg ...
Read more >
pytest-profiling - PyPI
Profiling plugin for pytest, with tabular and heat graph output. Tests are profiled with cProfile and analysed with pstats; heat graphs are generated...
Read more >
Can I run line_profiler over a pytest test? - Stack Overflow
I tried to give the absolute path to the py. test.exe binary but I get a different error: "TypeError: compile() expected string without...
Read more >
807757 – dev-python/matplotlib-3.4.2 - fails 18 tests on ppc64
Created attachment 737047 [details] build.log.xz (ppc64, 3.4.2, new) I was about to work on this but now I can't reproduce these test .svg...
Read more >
pytest fixtures: explicit, modular, scalable
That doesn't mean they can't be requested though; just that it isn't necessary. Scope: sharing fixtures across classes, modules, packages or session¶. Fixtures ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found