pythonprofilers / memory_profiler

Monitor Memory usage of Python code
http://pypi.python.org/pypi/memory_profiler
Other
4.39k stars 380 forks source link

MProf won't properly pass arguments to super( ). __init__( ) #306

Closed kirkatia98 closed 9 months ago

kirkatia98 commented 3 years ago
    def __init__(self, order_line, ledger):
        super().__init__(order_line, ledger)

The code works without issue without mprof, but when running with mprof, this issue occurs.

Traceback (most recent call last):
  File "main.py", line 229, in <module>
    (order, executed) = parse_order_into_ledger(line[1:], my_ledger)
  File "main.py", line 192, in parse_order_into_ledger
    order_object = CancelOrder(order_string, ledger)
  File "main.py", line 172, in __init__
    super().__init__(order_line, ledger)
TypeError: super() takes at least 1 argument (0 given)

Replacing the call to super( ). init( ) with the code itself resolves the issue.