- List item
@TOCTraceback (most recent call last):
File “E:\Anaconda3\Scripts\jupyter-notebook-script.py”, line 10, in
sys.exit(main())
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\jupyter_core\application.py”, line 282, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\traitlets\config\application.py”, line 1051, in launch_instance
app = cls.instance(**kwargs)
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\traitlets\config\configurable.py”, line 575, in instance
inst = cls(*args, **kwargs)
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py”, line 1311, in new
inst.setup_instance(*args, **kwargs)
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py”, line 1354, in setup_instance
super(HasTraits, self).setup_instance(*args, **kwargs)
File “C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\traitlets\traitlets.py”, line 1330, in setup_instance
init(self)
File “E:\Anaconda3\lib\site-packages\notebook\traittypes.py”, line 226, in instance_init
self._resolve_classes()
File “E:\Anaconda3\lib\site-packages\notebook\traittypes.py”, line 238, in _resolve_classes
warn(f"{klass} is not importable. Is it installed?", ImportWarning)
TypeError: warn() missing 1 required keyword-only argument: ‘stacklevel’
运行以下命令解决问题:
pip uninstall traitlets
pip install traitlets==5.9.0