Comments (11)
Would you paste Jupyter's console output? It should give a more detailed error message.
from hide_code.
Sorry I have not been able to provide this. Vacation got in the way.
from hide_code.
Hi, I've got the same problem. here is the log from jupyter:
jupyter (1.0.0)
jupyter-client (4.1.1)
jupyter-console (4.0.3)
jupyter-core (4.1.1)
hide-code (0.3.0)
nbconvert (4.2.0)
It was working from the UI side before upgrading to nbconvert (4.2.0), and i have upgraded to use command line. Now, the command line is working fine, but i have some difficulties to get back to downgrade ..
[I 13:54:30.007 NotebookApp] Kernel started: 8d857ec5-59e4-44e6-af6e-de5ba5346e21
[W 13:57:59.372 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/latexpdf (127.0.0.1): No such file or directory: diabox.ipynb/export/latexpdf
[W 13:57:59.374 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/latexpdf (127.0.0.1) 3.38ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:02.990 NotebookApp] 404 GET /nbextensions/hide-codefffdg.js?v=20160811135418 (127.0.0.1) 3.98ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:05.453 NotebookApp] 404 GET /nbextensions/hide-code.js?v=20160811135418 (127.0.0.1) 2.32ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:05.872 NotebookApp] 404 GET /nbextensions/hide-codeff.js?v=20160811135418 (127.0.0.1) 2.26ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:11.141 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/pdf (127.0.0.1): No such file or directory: diabox.ipynb/export/pdf
[W 13:58:11.142 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/pdf (127.0.0.1) 2.40ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:14.551 NotebookApp] 404 GET /nbextensions/hide-code.js?v=20160811135418 (127.0.0.1) 1.16ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:14.553 NotebookApp] 404 GET /nbextensions/hide-codefffdg.js?v=20160811135418 (127.0.0.1) 0.96ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:16.973 NotebookApp] 404 GET /nbextensions/hide-codeff.js?v=20160811135418 (127.0.0.1) 2.31ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:24.638 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/html (127.0.0.1): No such file or directory: diabox.ipynb/export/html
[W 13:58:24.639 NotebookApp] 404 GET /notebooks/diabox.ipynb/export/html (127.0.0.1) 2.42ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:27.801 NotebookApp] 404 GET /nbextensions/hide-codefffdg.js?v=20160811135418 (127.0.0.1) 1.03ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:30.147 NotebookApp] 404 GET /nbextensions/hide-code.js?v=20160811135418 (127.0.0.1) 2.27ms referer=http://localhost:8881/notebooks/diabox.ipynb
[W 13:58:30.656 NotebookApp] 404 GET /nbextensions/hide-codeff.js?v=20160811135418 (127.0.0.1) 2.12ms referer=http://localhost:8881/notebooks/diabox.ipynb
from hide_code.
Did hide_code install cleanly from pip install hide_code
?
from hide_code.
not exactly, because i ran pip install as root, and get #1 .
So I run manually
python -c "import hide_code.hide_code as hc; hc.install('/home/Users/.../.jupyter/custom')"
as my user
it complain about missing custom.js, so i had to touch this file manually.
after relauchnig it, install add this to custom.js:
define([
'base/js/events'
],
function(events) {
events.on('app_initialized.NotebookApp', function(){
require(['custom/hide_code']);
});
});
EDIT: I forgot to mention error running jupyter
% jupyter notebook
[W 09:45:03.631 NotebookApp] Unrecognized JSON config file version, assuming version 1
[I 09:45:03.705 NotebookApp] hide_code: Attempting to load hid_code export handler extensions.
[W 09:45:03.705 NotebookApp] Error loading server extension hide_code.hide_code
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/notebook/notebookapp.py", line 994, in init_server_extensions
func(self)
File "/usr/local/lib/python2.7/dist-packages/hide_code/hide_code.py", line 75, in load_jupyter_server_extension
(route_pattern_for('html'), HideCodeHTMLExportHandler),
File "/usr/local/lib/python2.7/dist-packages/hide_code/hide_code.py", line 161, in route_pattern_for
for i in range(1, hc_config.get('nested_params_depth')):
TypeError: range() integer end argument expected, got NoneType.
from hide_code.
Would you post the output from python -c "import hide_code as hc; print(hc.HideCodeConfig.config_file)"
.
from hide_code.
Yes:
% python -c "import hide_code as hc; print(hc.HideCodeConfig.config_file)"
/usr/lib/python2.7/site-packages/hide_code/hide_code_config.json
% ls -l /usr/lib/python2.7/site-packages/hide_code/hide_code_config.json
ls: cannot access /usr/lib/python2.7/site-packages/hide_code/hide_code_config.json: No such file or directory
I've found that the file exist here:
% ls -l /usr/local/lib/python2.7/dist-packages/hide_code/hide_code_config.json
-rw-r--r-- 1 root staff 26 Aug 11 09:40 /usr/local/lib/python2.7/dist-packages/hide_code/hide_code_config.json
from hide_code.
If /usr/lib/python2.7/site-packages/hide_code/
directory exists then copying /usr/local/lib/python2.7/dist-packages/hide_code/hide_code_config.json
into the directory should fix the problem.
I'm not sure why pip is installing into dist-packages though. I thought site-packages was the the default location. Either way I'll add dist-packages as a place to check for the config file.
from hide_code.
there is no /usr/lib/python2.7/site-packages
directory (ubuntu 14.04)
so i've
mkdir /usr/lib/python2.7/site-packages/
ln -s /usr/local/lib/python2.7/dist-packages/hide_code /usr/lib/python2.7/site-packages/
And now it works. Nice!
from hide_code.
@oarcher would you remove the symlink, download the dev branch and install? The path issue you're seeing should be fixed.
from hide_code.
Nice, it works now!
# pip install git+git://github.com/kirbs-/hide_code.git@dev
Downloading/unpacking git+git://github.com/kirbs-/hide_code.git@dev
Cloning git://github.com/kirbs-/hide_code.git (to dev) to /tmp/pip-vFrvAS-build
Running setup.py (path:/tmp/pip-vFrvAS-build/setup.py) egg_info for package from git+git://github.com/kirbs-/hide_code.git@dev
Requirement already satisfied (use --upgrade to upgrade): jupyter in /usr/local/lib/python2.7/dist-packages (from hide-code==0.3.1)
Requirement already satisfied (use --upgrade to upgrade): pdfkit in /usr/local/lib/python2.7/dist-packages (from hide-code==0.3.1)
Installing collected packages: hide-code
Running setup.py install for hide-code
Running post install task...
Starting hide_code.js install...
No config directories contain "custom" folder. Trying Jupyter notebook module path...
Attempting to configure custom.js to auto-load hide_code.js...
Configured custom.js to auto-load hide_code.js.
Attempting to configure auto-loading for hide_code export handlers.
Jupyter already configured to auto-load export handlers.
Successfully installed hide-code
Cleaning up...
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.