Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Empty array doesn't have max() at max(linenos) #47

Open
causalitygroup opened this issue Feb 11, 2016 · 1 comment
Open

Empty array doesn't have max() at max(linenos) #47

causalitygroup opened this issue Feb 11, 2016 · 1 comment
Labels
being considered Actively being investigated by maintainers for merging

Comments

@causalitygroup
Copy link

Just a quick note, I had an exception until I edited show_func() to have a guard for max(linenos) like this:

    if len(linenos):
        nlines = max(linenos) - min(min(linenos), start_lineno) + 1
    else:
        nlines = 1

Hope this helps. Great module btw, amazing how short a line profiler can be.

@burnpanck
Copy link

Had this issue too, in my case the culprit was a dynamically compiled function (so no source code available). I don't quite see why there are no line numbers for that function either, but probably just because it wasn't called at all...

@caethan caethan added the being considered Actively being investigated by maintainers for merging label Feb 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
being considered Actively being investigated by maintainers for merging
Projects
None yet
Development

No branches or pull requests

3 participants