jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Can't download as anything in jupyter notebook #467

Open kkew3 opened 5 years ago

kkew3 commented 5 years ago

When I use "download as" and select anything in browser, it pops up "500 Internal Server Error". If I instead go to terminal and type

jupyter nbconvert --to ${anything} filename.ipynb

where ${anything} is substituted with any supported format (e.g.: pdf, html, latex), it complains: "ValueError: Unknown exporter "${anything}", did you mean one of: ?". Full traceback below:

Traceback (most recent call last):
  File "$VIRTUAL_ENV/bin/jupyter-nbconvert", line 12, in <module>
    sys.exit(main())
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 337, in start
    self.convert_notebooks()
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 496, in convert_notebooks
    cls = get_exporter(self.export_format)
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/nbconvert/exporters/base.py", line 113, in get_exporter
    % (name, ', '.join(get_export_names())))
ValueError: Unknown exporter "${anything}", did you mean one of: ?

where $VIRTUAL_ENV is the home directory of the virtualenv environment.

Version info:

jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
ipython==6.4.0
prompt-toolkit==1.0.15

I take these package versions from a post under this issue, in order to solve malfunction of ipython console where multi-line function cannot be defined (broken dependency with prompt-toolkit).

Thanks for any suggestion to fix the "download as" issue.

Just found that even the latest set of jupyter dependencies won't work:

ipython=7.1.1
ipython-genutils=0.2.0
jupyter=1.0.0
jupyter-client=5.2.3
jupyter-console=6.0.0
jupyter-core=4.4.0
prompt-toolkit=2.0.7
minrk commented 5 years ago

Can you include the complete output of pip list? How did you install nbconvert? I suspect this points to a problem installing and/or reading the entrypoints metadata used to find exporters.

kkew3 commented 5 years ago

Thanks for your response. I believe nbconvert is installed automatically as one of the dependencies of jupyter. In fact, I think I've located the problem. I posted my solution under Issues of ipython. In case I should have posted it here, this is the link: https://github.com/ipython/ipython/issues/11512.