Giter VIP home page Giter VIP logo

Comments (10)

kirbs- avatar kirbs- commented on May 31, 2024

5.0 just came out a couple of weeks ago. I haven't tested against that yet. Would you post the output from the pip install?

Also, the exporting issues you mention should go away if you restart Juypter. The import errors you're seeing usually happen when hide_code is installed with Juypter already running. Checkout issue #21.

from hide_code.

jkleint avatar jkleint commented on May 31, 2024

Thanks for the response. The pip output is not interesting, except that it does not contain any of the Running setup.py install or post-install stuff, which would explain why it's not getting installed.

I also discovered that a pip uninstall does not remove the extension, since the JS (should) get copied into ~/.local/share/jupyter/nbextensions/, and pip does not remove things from there. Perhaps there's some way to hook into whatever jupyter nbextension uninstall is doing.

The exporting issues are still issues after restart; I think the URLs have just changed.

I made sure Jupyter wasn't running when installing hide_code, but still get the import error. The string HideCodeLatexPDFExporter is not physically present in any Python file.

Also, and this is actually a problem, once you've done 'hide code' on the cell toolbar, then save and re-open the notebook, the 'Hide/show code' button does not work, and your code is gone with no easy way to retrieve it. That's non-awesome.

Thanks again.

from hide_code.

kirbs- avatar kirbs- commented on May 31, 2024

I think the problem you're seeing is due to a manual install into the nbextensions directory. The JS for the UI is being loaded, but all the backend stuff isn't.

Can you paste the output from Jupyter's console right after startup? It should look like below.

[W 19:02:32.053 NotebookApp] Unrecognized JSON config file version, assuming version 1
[I 19:02:37.352 NotebookApp] hide_code: Attempting to load hid_code export handler extensions.
[I 19:02:37.354 NotebookApp] hide_code: Hide_code export handler extensions loaded.
[I 19:02:37.355 NotebookApp] Serving notebooks from local directory: /Users/****/git/esp8266-micropython-vagrant/ESP8266
[I 19:02:37.355 NotebookApp] 0 active kernels 
[I 19:02:37.355 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 19:02:37.355 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

Notice the second and third lines. This indicates the backend server extensions are loaded.

from hide_code.

JRocki avatar JRocki commented on May 31, 2024

I am having similar issues. Really do like this though!

from hide_code.

kirbs- avatar kirbs- commented on May 31, 2024

Can you paste the output from Jupyter's console right after startup? It should look like below.

[W 19:02:32.053 NotebookApp] Unrecognized JSON config file version, assuming version 1
[I 19:02:37.352 NotebookApp] hide_code: Attempting to load hid_code export handler extensions.
[I 19:02:37.354 NotebookApp] hide_code: Hide_code export handler extensions loaded.
[I 19:02:37.355 NotebookApp] Serving notebooks from local directory: /Users/****/git/esp8266-micropython-vagrant/ESP8266
[I 19:02:37.355 NotebookApp] 0 active kernels 
[I 19:02:37.355 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 19:02:37.355 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

from hide_code.

lum4chi avatar lum4chi commented on May 31, 2024

Don't know if this can help: I experienced some trouble too loading this extension. I've been able to load this by forcing it in jupyter_notebook_config.json. It should appear something like:
{
"NotebookApp": {
"nbserver_extensions": {
"jupyter_nbextensions_configurator": true,
"hide_code.hide_code": true
},
"extra_template_paths": [
"/Users/XXX/Library/Jupyter/templates"
]
},
"version": 1
}
But now it works like a charm!

Hope it helps: by the way I'm able to confirm that all is running with package updated at the time that I'm writing.

from hide_code.

kirbs- avatar kirbs- commented on May 31, 2024

Thanks! Are you able to export notebooks with code hidden too?

from hide_code.

lum4chi avatar lum4chi commented on May 31, 2024

Yes, but only when correct used cell checkboxes (<> work only as preview) and, as required, notebook needs to be saved in order to export. PDF export works too, but page format is huge (code is small compared to page). Maybe is fault of an unknown configuration. Amy suggestion?

from hide_code.

kirbs- avatar kirbs- commented on May 31, 2024

I'll test this out. I've been meaning to support nbextension installation.

from hide_code.

kirbs- avatar kirbs- commented on May 31, 2024

I'll open a new issue for the this @lum4chi

from hide_code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.