Comments (11)
Strange. I'll look into it. Looks like your using Python 3.6. Are you using anaconda too?
from hide_code.
No, virtualenv neither. I'm on Mac OS, brewed python and pip.
Edit: closing button pressed because slow reload on a touch screen ^^'
from hide_code.
Ran into the same exact problem. Having a print statement in the code starts generating 500 errors. Also on Mac OS. No virtualenv.
Uncaught exception GET /notebooks/Community/Print.ipynb/export/html (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Community/Print.ipynb/export/html', version='HTTP/1.1', remote_ip='::1', headers={'Accept-Language': 'en-US,en;q=0.8,de;q=0.6,ja;q=0.4,es;q=0.2,pt;q=0.2,cs;q=0.2,fr;q=0.2', 'Accept-Encoding': 'gzip, deflate, sdch, br', 'Host': 'localhost:8888', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36', 'Connection': 'keep-alive', 'Referer': 'http://localhost:8888/notebooks/Community/Print.ipynb', 'Cookie': '_xsrf=2|26dbddb9|eafafdf5adc4886dd4dc0fd07653ebb5|1485225470; username-localhost-8888="2|1:0|10:1485286696|23:username-localhost-8888|44:NjlkNDU5ZmVjNWJlNDJiNDlkMjFlODY3NDdmOWZkODU=|9ffcdd833b65310e0d013f642373948c465f8710e8d0f6281b741e0d576db36c"', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1467, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/usr/local/lib/python2.7/site-packages/hide_code/hide_code.py", line 25, in get
output_html, resources = exporter.from_notebook_node(nb)
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/html.py", line 69, in from_notebook_node
return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/templateexporter.py", line 239, in from_notebook_node
output = self.template.render(nb=nb_copy, resources=resources)
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/hide_code/Templates/hide_code.tpl", line 1, in top-level template code
{%- extends 'full.tpl' -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/full.tpl", line 2, in top-level template code
{% from 'mathjax.tpl' import mathjax %}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 1, in top-level template code
{%- extends 'display_priority.tpl' -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/display_priority.tpl", line 1, in top-level template code
{%- extends 'null.tpl' -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 26, in top-level template code
{%- block body -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/full.tpl", line 67, in block "body"
{{ super() }}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 28, in block "body"
{%- block any_cell scoped -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 30, in block "any_cell"
{%- block codecell scoped -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 6, in block "codecell"
{{ super() }}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 36, in block "codecell"
{%- block output_group -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 19, in block "output_group"
{{ super() }}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 38, in block "output_group"
{%- block outputs scoped -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 40, in block "outputs"
{%- block output scoped -%}
File "/usr/local/lib/python2.7/site-packages/hide_code/Templates/hide_code.tpl", line 43, in block "output"
{% block execute_result -%} {{ super() }} {%- endblock execute_result %}
File "/usr/local/lib/python2.7/site-packages/hide_code/Templates/hide_code.tpl", line 43, in block "execute_result"
{% block execute_result -%} {{ super() }} {%- endblock execute_result %}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 90, in block "execute_result"
{% block data_priority scoped %}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 91, in block "data_priority"
{{ super() }}
File "/usr/local/lib/python2.7/site-packages/nbconvert/exporters/../templates/skeleton/display_priority.tpl", line 7, in block "data_priority"
{%- for type in output.data | filter_data_type -%}
File "/usr/local/lib/python2.7/site-packages/nbconvert/filters/datatypefilter.py", line 41, in __call__
mimetypes=output.keys())
UndefinedError: 'nbformat.notebooknode.NotebookNode object' has no attribute 'data'
from hide_code.
@lum4chi @leeclemmer would you post the version of Jupyter and notebook your running?
pip list | grep jupyter && pip list | grep notebook
should do the trick.
from hide_code.
jupyter (1.0.0)
jupyter-client (4.4.0)
jupyter-console (5.0.0)
jupyter-contrib-core (0.3.0)
jupyter-contrib-nbextensions (0.2.3)
jupyter-core (4.2.1)
jupyter-highlight-selected-word (0.0.7)
jupyter-latex-envs (1.3.6)
jupyter-nbextensions-configurator (0.2.3)
notebook (4.3.1)
from hide_code.
Looks like the 5.0 version of nbconvert changed its API. Until I get this patched you can downgrade nbconvert to 4.3.0 to get hide_code exporting to work.
pip install 'nbconvert==4.3.0' --force-reinstall
Also, what version of nbformat are you using?
from hide_code.
nbformat 4.2.0
from hide_code.
@lum4chi I think this is resolved with nbconvert 5.1.1. Would you upgrade and see if the issue is resolved on your end?
from hide_code.
Hello, I can't confirmed because I've upgraded again some other packages and now hide_code toolbar nor buttons show up and another installation of the plugin cause no effect ^^'. I'm sure have some misconfiguration made by me and need time to investigate.
I'm hoping for nbextension integration :D
from hide_code.
@lum4chi @leeclemmer this is fixed now in the dev branch if you want to test it out. I'll push the update to pypi in a couple of days.
from hide_code.
This is fixed in version 0.5.0.
from hide_code.
Related Issues (20)
- URL for exports are incorrect using jupyterhub HOT 1
- Support for recent nbconvert and traitlets HOT 4
- Invalid file name and extension if title contains spaces
- It is impossible to export to HTML if notebook was renamed
- Export to HTML and PDF still with the output HOT 6
- Hide code : Support for letters with accent marks HOT 2
- Using hide_code then convert to PDF HOT 1
- Add Binder demo HOT 1
- Use tags to identify cell disclosure state
- hide-code v0.5.5 cannot be installed via pypi HOT 2
- Install with Conda HOT 1
- Installation problem - No module named hide_code_html_exporter HOT 9
- Exporting result in 404 error on Jupyterhub HOT 1
- 404 : Not Found You are requesting a page that does not exist! HOT 4
- Export issue (jinja2.exceptions.TemplateNotFound: hide_code_full.tpl) HOT 8
- 500: Internal Server Error when exporting to... anything? HOT 6
- Jupyter Lab 3.0 not supported HOT 4
- Can't install into an empty virtual environment HOT 1
- Traitlets too old for Jupyter Server HOT 3
- Impossible to make it work with jupyter installed with anaconda
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hide_code.