AssertionError in vmprofshow gives not very helpful error · Issue #154 · vmprof/vmprof-python · GitHub
Skip to content

AssertionError in vmprofshow gives not very helpful error #154

Description

@boxed

First try of using vmprof.. I've generated a 14 meg profiler with --line and --mem flags on, tried to run vmprofshow and get:

Fatal: could not read vmprof profile file 'vmprof_unit_tests.prof': 

Searched the code for that error and found it here:

That way of formatting exception output isn't very good as you can see as the type is lost and sometimes the type is all the data there was (plus the stack trace, which is also lost). After changing the line below from return to raise I get:

Traceback (most recent call last):
  File "/Users/andersh/triresolve/env/bin/vmprofshow", line 11, in <module>
    sys.exit(main())
  File "/Users/andersh/triresolve/env/lib/python2.7/site-packages/vmprof/show.py", line 263, in main
    pp.show(args.profile)
  File "/Users/andersh/triresolve/env/lib/python2.7/site-packages/vmprof/show.py", line 35, in show
    stats = vmprof.read_profile(profile)
  File "/Users/andersh/triresolve/env/lib/python2.7/site-packages/vmprof/profiler.py", line 49, in read_profile
    meta=state.meta, state=state)
  File "/Users/andersh/triresolve/env/lib/python2.7/site-packages/vmprof/stats.py", line 21, in __init__
    self.generate_top()
  File "/Users/andersh/triresolve/env/lib/python2.7/site-packages/vmprof/stats.py", line 73, in generate_top
    assert addr <= 0
AssertionError

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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