"No module named jupyter_client.manager" error throws up in Travis CI tests

802 views
Skip to first unread message

Sreehari S

unread,
Nov 11, 2016, 3:33:36 PM11/11/16
to Project Jupyter
I am trying to test a bunch of ipython notebooks and I've been trying to do the same using the 'nbformat' and the 'nbconvert' libraries. 

I get the error - "No module named jupyter_client.manager" on the Travis CI tests and this does not happen when I run the tests locally.

The .travis.yml file has the following under install:
install:
  - conda create --yes -n gensim-test python=$TRAVIS_PYTHON_VERSION pip atlas numpy scipy
  - source activate gensim-test
  - pip install pyemd
  - pip install annoy
  - pip install testfixtures
  - pip install entrypoints
  - pip install .

What exactly should I do to remove the error in the CI tests? As in, do I have to separately install jupyter_client by specifying it in the .travis.yml file?

The error trace looks like this on the Travis CI logs:

======================================================================

ERROR: test_notebooks (gensim.test.test_notebooks.TestNotebooks)

----------------------------------------------------------------------

Traceback (most recent call last):

File "/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_notebooks.py", line 50, in test_notebooks

nb, errors = _notebook_run(notebook)

File "/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_notebooks.py", line 32, in _notebook_run

ep.preprocess(nb, {'metadata': {'path': this_file_directory}})

File "/home/travis/build/RaRe-Technologies/gensim/.eggs/nbconvert-5.0.0b1-py2.7.egg/nbconvert/preprocessors/execute.py", line 166, in preprocess

from jupyter_client.manager import start_new_kernel

ImportError: No module named jupyter_client.manager

======================================================================

ERROR: test_notebooks (gensim.test.test_notebooks.TestNotebooks)

----------------------------------------------------------------------

Traceback (most recent call last):

File "/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_notebooks.py", line 50, in test_notebooks

nb, errors = _notebook_run(notebook)

File "/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_notebooks.py", line 32, in _notebook_run

ep.preprocess(nb, {'metadata': {'path': this_file_directory}})

File "/home/travis/build/RaRe-Technologies/gensim/.eggs/nbconvert-5.0.0b1-py2.7.egg/nbconvert/preprocessors/execute.py", line 166, in preprocess

from jupyter_client.manager import start_new_kernel

ImportError: No module named jupyter_client.manager

Thomas Kluyver

unread,
Nov 11, 2016, 4:54:28 PM11/11/16
to Project Jupyter
On 11 November 2016 at 12:33, Sreehari S <sree...@gmail.com> wrote:
What exactly should I do to remove the error in the CI tests? As in, do I have to separately install jupyter_client by specifying it in the .travis.yml file?

You either need to install jupyter_client, or install nbconvert[execute] - this is equivalent; nbconvert has an extra called 'execute' which depends on jupyter_client.

Sreehari S

unread,
Nov 12, 2016, 4:38:06 AM11/12/16
to Project Jupyter
Thank you! I added jupyter_client to the test dependencies and it worked!
Reply all
Reply to author
Forward
0 new messages