Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbconvert failure on jupyterhub #408

Closed
epifanio opened this issue Nov 12, 2015 · 5 comments
Closed

nbconvert failure on jupyterhub #408

epifanio opened this issue Nov 12, 2015 · 5 comments

Comments

@epifanio
Copy link
Contributor

I just upgraded to the latest version (git master) of python, jupyter, notebook, jupyterhub, nbconvert. And I installed IPython-notebook-extensions appliend the changes from:

#402

When tring to save as html, or pdf i have this log :

Could not construct Exporter: The 'parent' trait of a CodeFoldingPreprocessor instance must be a Configurable, but a value of class 'nbconvert.exporters.pdf.PDFExporter' (i.e. <nbconvert.exporters.pdf.PDFExporter object at 0x7fd7f39f8908>) was specified.

and to html:

Could not construct Exporter: The 'parent' trait of a CodeFoldingPreprocessor instance must be a Configurable, but a value of class 'nbconvert.exporters.html.HTMLExporter' (i.e. <nbconvert.exporters.html.HTMLExporter object at 0x7fd7f0a17f60>) was specified.

While this is the full log if I try to use nbcovert from the command line:
https://gist.github.com/50e5e8568c08b4f245cb

I guess it is failing because of the changes in the config files which in my case are:
jupyter_nbconvert_config.py and jupyter_nbconvert_config.json

in the log i see: /home/epinux/.local/share/jupyter/templates but this file is no more on my system and also: jupyter_nbconvert_config-json-L8 i think /user/ is a typo and should be /usr/.

@juhasch
Copy link
Member

juhasch commented Nov 12, 2015

The error seems to be due to recent changes in places other than nbconvert. I don't see this with the latest master of nbconvert.

The templates path is set using the juyper_data_dir as base director:

from jupyter_core.paths import jupyter_data_dir
jupyter_data_dir()

Can you check what this call returns for you ?

@epifanio
Copy link
Contributor Author

From a notebook running under the user epinux it returns:

/home/epinux/.local/share/jupyter

if I log out and log in with an other user, like user2 it is giving me:

/home/user2/.local/share/jupyter

In my case there is no .local/share/jupyter directory for all the users. I have all the configuration and extension files in the global directory: /usr/loacl/share/jupyter/.

Does it make sense, In case there is no /home/$USER/.local/share/jupyter (which can be the case for jupyerhub) to have the templat-epath to point to the global directory which is available for all the users and that is:

/usr/loacl/share/jupyter/

@juhasch
Copy link
Member

juhasch commented Nov 13, 2015

Yes it makes sense to check, if the path exists and use another one instead.
Can you check what this returns:

import jupyter_core.paths
jupyter_core.paths.jupyter_config_path()

@epifanio
Copy link
Contributor Author

Running:

import jupyter_core.paths
jupyter_core.paths.jupyter_config_path()

From a py3 notebook, as user "epinux" it returns:

['/home/epinux/.jupyter',
 '/home/epilib/Envs/env1/etc/jupyter',
 '/usr/local/etc/jupyter',
 '/etc/jupyter']

@juhasch
Copy link
Member

juhasch commented Mar 6, 2016

Likely solved by #492. If not, please reopen this issue.

@juhasch juhasch closed this as completed Mar 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants