Jupytext: ModuleNotFoundError: No module named 'toml'

Created on 2 Jul 2020  路  2Comments  路  Source: mwouts/jupytext

I ran into an issue on first install of jupytext, awesome project by the way 馃挴

Installing the missing dependency solved my issue but figured I would flag it for you. Let me know if you want any additional info.

  • Running on latest MacOS
  • installed using Pipenv with pyenv
  • using jupyter lab
[E 10:44:48.645 LabApp] Uncaught exception GET /api/contents/?content=1&1593701088622 (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/contents/?content=1&1593701088622', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/tornado/web.py", line 1703, in _execute
        result = await result
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
        yielded = next(result)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/notebook/services/contents/handlers.py", line 111, in get
        model = yield maybe_future(self.contents_manager.get(
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/jupytext/contentsmanager.py", line 179, in get
        return super(JupytextContentsManager, self).get(
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/notebook/services/contents/filemanager.py", line 427, in get
        model = self._dir_model(path, content=content)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/notebook/services/contents/filemanager.py", line 336, in _dir_model
        self.get(path='%s/%s' % (path, name), content=False)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/jupytext/contentsmanager.py", line 183, in get
        config = self.get_config(path, use_cache=content is False)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/jupytext/contentsmanager.py", line 427, in get_config
        self.cached_config.config = load_jupytext_config(parent_dir)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/jupytext/config.py", line 273, in load_jupytext_config
        return load_jupytext_configuration_file(config_file)
      File "/Users/ian/.local/share/virtualenvs/machine-learning-fZ2vyPoi/lib/python3.8/site-packages/jupytext/config.py", line 246, in load_jupytext_configuration_file
        import toml
    ModuleNotFoundError: No module named 'toml'

Most helpful comment

Version 1.5.1 is now available at https://pypi.org/project/jupytext/. Thanks @IanEdington , and please let me know if you see anything else to improve!

All 2 comments

Hello @IanEdington, thanks for reporting this.
Yes that is correct... toml was not included in the requirements in 1.5.0.
This will be fixed in the next release!

Version 1.5.1 is now available at https://pypi.org/project/jupytext/. Thanks @IanEdington , and please let me know if you see anything else to improve!

Was this page helpful?
0 / 5 - 0 ratings