Select to view content in your preferred language

warn() missing 1 required keyword-only argument: 'stacklevel'

275
0
4 weeks ago
Beached_Buoy
New Contributor

Gentlefolk,

I'm attempting to use the ArcGIS API for Python to generate a map for a project. After unsuccessfully attempting to assemble the proper combination of libraries and Python versions, I decided to attempt to spin up the Docker container. When I attempt to launch the Docker instance, it crashes thusly: 

~~

2024-07-08 19:52:51 Entered start.sh with args: jupyter notebook
2024-07-08 19:52:51 Running hooks in: /usr/local/bin/start-notebook.d as uid: 1000 gid: 100
2024-07-08 19:52:51 Done running hooks in: /usr/local/bin/start-notebook.d
2024-07-08 19:52:51 Running hooks in: /usr/local/bin/before-notebook.d as uid: 1000 gid: 100
2024-07-08 19:52:51 Done running hooks in: /usr/local/bin/before-notebook.d
2024-07-08 19:52:51 Executing the command: jupyter notebook
2024-07-08 19:52:53 Traceback (most recent call last):
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 235, in _resolve_classes
2024-07-08 19:52:53 klass = self._resolve_string(klass)
2024-07-08 19:52:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 2025, in _resolve_string
2024-07-08 19:52:53 return import_item(string)
2024-07-08 19:52:53 ^^^^^^^^^^^^^^^^^^^
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/utils/importstring.py", line 31, in import_item
2024-07-08 19:52:53 module = __import__(package, fromlist=[obj])
2024-07-08 19:52:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-08 19:52:53 ModuleNotFoundError: No module named 'jupyter_server.contents'
2024-07-08 19:52:53
2024-07-08 19:52:53 During handling of the above exception, another exception occurred:
2024-07-08 19:52:53
2024-07-08 19:52:53 Traceback (most recent call last):
2024-07-08 19:52:53 File "/opt/conda/bin/jupyter-notebook", line 10, in <module>
2024-07-08 19:52:53 sys.exit(main())
2024-07-08 19:52:53 ^^^^^^
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/jupyter_core/application.py", line 280, in launch_instance
2024-07-08 19:52:53 super().launch_instance(argv=argv, **kwargs)
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/config/application.py", line 1051, in launch_instance
2024-07-08 19:52:53 app = cls.instance(**kwargs)
2024-07-08 19:52:53 ^^^^^^^^^^^^^^^^^^^^^^
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 575, in instance
2024-07-08 19:52:53 inst = cls(*args, **kwargs)
2024-07-08 19:52:53 ^^^^^^^^^^^^^^^^^^^^
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1311, in __new__
2024-07-08 19:52:53 inst.setup_instance(*args, **kwargs)
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1354, in setup_instance
2024-07-08 19:52:53 super(HasTraits, self).setup_instance(*args, **kwargs)
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1330, in setup_instance
2024-07-08 19:52:53 init(self)
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 226, in instance_init
2024-07-08 19:52:53 self._resolve_classes()
2024-07-08 19:52:53 File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 238, in _resolve_classes
2024-07-08 19:52:53 warn(f"{klass} is not importable. Is it installed?", ImportWarning)
2024-07-08 19:52:53 TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'

~~

It appears to me to be a problem with Jupyter Notebook. I'm familiar with updating libraries in Python, but I beg your forgiveness for bring a relative beginner with Docker.

I attempted to launch the selfsame Docker package on another machine, with the same result. 

I was able to successfully launch the version 2.2.0-python3.9, but with that version I have a different problem

I would appreciate greatly any guidance. 

 

0 Kudos
0 Replies