CNN中的错误

runfile('D:/dnl-depthnormals1/dnl-depthnormals/demo_depthnormals.py', wdir='D:/dnl-depthnormals1/dnl-depthnormals')
Traceback (most recent call last):

  File "<ipython-input-1-601756786d45>", line 1, in <module>
    runfile('D:/dnl-depthnormals1/dnl-depthnormals/demo_depthnormals.py', wdir='D:/dnl-depthnormals1/dnl-depthnormals')

  File "D:\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "D:\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/dnl-depthnormals1/dnl-depthnormals/demo_depthnormals.py", line 7, in <module>
    import net

  File "D:\dnl-depthnormals1\dnl-depthnormals\net.py", line 21, in <module>
    import ipdb

  File "D:\anaconda3\lib\site-packages\ipdb\__init__.py", line 7, in <module>
    from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa

  File "D:\anaconda3\lib\site-packages\ipdb\__main__.py", line 62, in <module>
    ipapp = TerminalIPythonApp.instance()

  File "D:\anaconda3\lib\site-packages\traitlets\config\configurable.py", line 423, in instance
    '%s are being created.' % cls.__name__

MultipleInstanceError: Multiple incompatible subclass instances of TerminalIPythonApp are being created.

注 line 423所属的函数为:
    def instance(cls, *args, **kwargs):
        """Returns a global instance of this class.

        This method create a new instance if none have previously been created
        and returns a previously created instance is one already exists.

        The arguments and keyword arguments passed to this method are passed
        on to the :meth:`__init__` method of the class upon instantiation.

        Examples
        --------

        Create a singleton class using instance, and retrieve it::

            >>> from traitlets.config.configurable import SingletonConfigurable
            >>> class Foo(SingletonConfigurable): pass
            >>> foo = Foo.instance()
            >>> foo == Foo.instance()
            True

        Create a subclass that is retrived using the base class instance::

            >>> class Bar(SingletonConfigurable): pass
            >>> class Bam(Bar): pass
            >>> bam = Bam.instance()
            >>> bam == Bar.instance()
            True
        """
        # Create and save the instance
        if cls._instance is None:
            inst = cls(*args, **kwargs)
            # Now make sure that the instance will also be returned by
            # parent classes' _instance attribute.
            for subclass in cls._walk_mro():
                subclass._instance = inst

        if isinstance(cls._instance, cls):
            return cls._instance
        else:
            raise MultipleInstanceError(
                'Multiple incompatible subclass instances of '
                '%s are being created.' % cls.__name__
            )

阅读 1.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题