Python cProfile and profile models skip functions

basically the cProfile module skips some functions when I run it, and the normal profile module generates this error.

    The debugged program raised the exception unhandled AssertionError
"('Bad call', ('objects/controller/StageController.py', 9, '__init__'), <frame object at 0x9bbc104>, <frame object at 0x9bb438c>, <frame object at 0x9bd0554>, <frame object at 0x9bcf2f4>)"
File: /usr/lib/python2.6/profile.py, Line: 301

ive performed all searches, and I did not find anything. How to make them work correctly?

@ yk4ever

The StageController.py class starts as follows:

class StageControl(ObjectControl):

    def __init__(self, canvas_name):
        ObjectControl.__init__(self, canvas_name,"stage_object")
        self.model = StageModel()
        self.variables()
        self.make_stage()
        self.overrides()

The "bad call" error above does not seem to like this class

+3
source share
2 answers

I found a problem. The Psyco ObjectControl class that inherited my "StageControl" is simple:

import psyco
psyco.full()

, , , "ObjectControl", . - psyco , , , .

psyco - , cython, - psyco, , . psyco.

: cython, C.

+2

Python Bug # 1117670, , . script, , . .

. msg24185 Python , Python 2.4.

Python ?

0

Source: https://habr.com/ru/post/1722122/


All Articles