kirbs- / hide_code

Code, prompt and output hiding for Jupyter/IPython notebooks.
MIT License
371 stars 44 forks source link

Latex PDF exporting is broken #65

Closed kirbs- closed 4 years ago

kirbs- commented 6 years ago

HideCodeLatexPDFExporter doesn't actually exist. Need to create the class as an extension of HideCodeLatexExporter. https://github.com/kirbs-/hide_code/blob/a5a76d43d25ce84603052bc2fb871b987aab95f4/setup.py#L97

[E 16:23:51.341 NotebookApp] Uncaught exception GET /notebooks/Daily_Report.ipynb (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Daily_Report.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/tornado/web.py", line 1541, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/tornado/web.py", line 2949, in wrapper
        return method(self, *args, **kwargs)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/notebook/handlers.py", line 59, in get
        get_custom_frontend_exporters=get_custom_frontend_exporters
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/base/handlers.py", line 424, in render_template
        return template.render(**ns)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
        return original_render(self, *args, **kwargs)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
        return self.environment.handle_exception(exc_info, True)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/templates/notebook.html", line 117, in block "header"
        {% for exporter in get_custom_frontend_exporters() %}
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/notebook/notebook/handlers.py", line 24, in get_custom_frontend_exporters
        exporter = get_exporter(name)()
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/nbconvert/exporters/base.py", line 95, in get_exporter
        return entrypoints.get_single('nbconvert.exporters', name).load()
      File "/home/dans/projects/Daily_Instrument_Review/DIR/lib/python3.6/site-packages/entrypoints.py", line 81, in load
        obj = getattr(obj, attr)
    AttributeError: module 'hide_code' has no attribute 'HideCodeLatexPDFExporter'
otisreid commented 5 years ago

I was wondering if there was any hope that this would get repaired soon -- it would be great to have this back!

kirbs- commented 5 years ago

Yup, it's on my radar. Planning on releasing an update in January.

gganapat commented 5 years ago

Any progress?