0

I'm new to Qt5 and I'm trying to develop something that's based on a working code. This is the following "code":

from qtconsole.manager import QtKernelManager

class whatever
    def __init__(self):
        super(whatever, self).__init__()
        kernel_manager = QtKernelManager(kernel_name=USE_KERNEL)
        ...

    def whatever2:
       ...
       self.kernel_manager.kernel.execution_count = 1

and I get an error:

AttributeError: 'QtKernelManager' object has no attribute 'kernel'

The thing is that I tried looking EVERYWHERE for this class and looked for attributes, but nothing comes up. Does anyone have a clue how to solve this and those kinds of problems in general?

Thanks!

ekhumoro
  • 115,249
  • 20
  • 229
  • 336
urie
  • 361
  • 2
  • 14
  • This seems to be part of the iPython project: https://ipython.org/ipython-doc/3/api/generated/IPython.qt.manager.html maybe you should look into the sources – musicamante Feb 06 '22 at 17:33
  • [qtconsole](https://github.com/jupyter/qtconsole) / [jupyter_client](https://github.com/jupyter/jupyter_client). There's no obvious evidence that either `kernel` or `execution_count` is a valid attribute. What happens if you comment that line out? And what is this "working code" you refer to? – ekhumoro Feb 07 '22 at 19:33
  • It turns out that my teammates downloaded the packages and changed it in our work, so I needed to go through their code. Thanks anyway! – urie Feb 08 '22 at 07:27

0 Answers0