Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is there a specific reason memory_usage return None when stream=True ? #397

Open
@PveOnly

Description

Hi, I'm just wondering why when stream is not None, memory_usage return None ?
https://github.com/pythonprofilers/memory_profiler/blob/a99a3c3b3c2eb01c90f6e14ddfcb85b3e97f9885/memory_profiler.py#L478C6-L478C6

I'm using stream + retval so my script is crashing since i'm getting a None object when doing
mem_usage,res=memory_usage((func,args,kwargs),stream=True, retval=True

My current fix is just removing the if stream : return None, but I would like to know if it will bite me later or if it's fine ?
I'm really not familiar with memory usage so maybe there is a specific reason.
Thanks

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

        AltStyle によって変換されたページ (->オリジナル) /