IPython module error

Options
yashpuranik
yashpuranik Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2022, Neuron 2023 Posts: 69 Neuron

I have a custom linux install of DSS. Recently, all my Python notebooks have been failing with the nginx error screen. On checking the logs, I see the following in ipython.log.

[2023/07/13-02:11:33.293] [8630/MainThread] [WARNING] [NotebookApp] Notebook version 5 is no longer maintained. Please upgrade to version 6 or later.
Traceback (most recent call last):
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/dkulauncher.py", line 3, in <module>
main()
File "/home/dataiku/dataiku-dss-12.1.0/python36.packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/dataiku/dataiku-dss-12.1.0/python36.packages/traitlets/config/application.py", line 663, in launch_instance
app.initialize(argv)
File "/home/dataiku/dataiku-dss-12.1.0/python36.packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/dataiku/dataiku-dss-12.1.0/python36.packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/notebookapp.py", line 1649, in initialize
self.init_webapp()
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/notebookapp.py", line 1386, in init_webapp
self.jinja_environment_options,
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/notebookapp.py", line 159, in __init__
handlers = self.init_handlers(settings)
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/notebookapp.py", line 309, in init_handlers
handlers.extend(load_handlers('notebook.services.contents.handlers'))
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/notebookapp.py", line 139, in load_handlers
mod = __import__(name, fromlist=['default_handlers'])
File "/home/dataiku/dataiku-dss-12.1.0/dku-jupyter/packages/notebook/services/contents/handlers.py", line 13, in <module>
from tornado.stack_context import StackContext
ModuleNotFoundError: No module named 'tornado.stack_context'

How do I go about updating my environment as suggested?

P.S: I chose version 11 below because the system won't let me choose 12.

Tagged:

Best Answer

  • Catalina
    Catalina Dataiker, Dataiku DSS Core Designer, Registered Posts: 135 Dataiker
    Answer ✓
    Options

    Hi @yashpuranik
    ,

    This issue occurs when packages were installed in the system/builtin Python environment of DSS and it's caused by incompatible versions of core packages used by DSS and mainly a version conflict of the ​Notebook server, which causes the Notebook server to fail ​to start because of the incompatible dependencies.
    ​​
    If this is the case, the solution is to stop DSS and move the now-unusable builtin environment and regenerate the builtin env with the usual procedure:

    /data/dataiku-dss-12.1.0/installer.sh -d -u /data/DATA_DIR

Answers

  • yashpuranik
    yashpuranik Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2022, Neuron 2023 Posts: 69 Neuron
    Options

    Thanks Catalina! That fixed it

    For reference, the Python environment referenced above on my instance was under @$DATA_DIR/pyenv. Moving that directory and rerunning the update procedure fixed things for me

Setup Info
    Tags
      Help me…