Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python.ipynb.html' not found. #6

Closed
fjp opened this issue Jul 11, 2018 · 8 comments
Closed

python.ipynb.html' not found. #6

fjp opened this issue Jul 11, 2018 · 8 comments

Comments

@fjp
Copy link

fjp commented Jul 11, 2018

Hi,

thanks for the gem. However, I always get the following error:

Not Found
`/test/python.ipynb.html' not found.
WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29) at localhost:4000

I placed the python.ipynb file inside the same folder as test.md.
Do I need to first export the ipython notebook as html manually?

@kou
Copy link
Member

kou commented Jul 12, 2018

Can you show your repository that reprouces this case and how to reproduce this case with the repository?

@fjp
Copy link
Author

fjp commented Jul 12, 2018

Currently I am testing it only local with the minimal mistakes jekyll theme. Later I wanted to host it on github but I guess this won't be possible anyway because the gem is not on the whitelist of github pages.

When I create a new post inside the _posts folder including the python.ipynb file and use the include tag, I get the error message when I want to display the post:

Not Found
`/ipython/python.ipynb.html' not found.
WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29) at localhost:4000

When I save the notebook as python.ipynb.html in a new folder (at the root dir) /ipython everything gets displayed as expected.

A similar thing happens when I want to create a new page inside the _pages folder. Then I get the following message (see also my first post, its the same):

Not Found
`/test/python.ipynb.html' not found.
WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29) at localhost:4000

This can be solved again by adding a folder test.

I am quite new to Jekyll and don't know how to fix this path issue. Has this something to do with how minimal mistakes works?

@kou
Copy link
Member

kou commented Jul 13, 2018

Can you upload your test files and share it?

@fjp
Copy link
Author

fjp commented Jul 16, 2018

The post inside _posts/2018-07-11-ipython.md contains:

---
layout: single
title:  "IPython"
date:   2018-07-11 20:10:12 +0200
toc: true
---

## Top page

Here is a Jupyter Notebook:

{% jupyter_notebook python.ipynb %}

### Raw rendered pages

  * [Raw IPython kernel](python-raw.html)

### Other kernels

  * [IRuby kernel](ruby/)

Inside the _posts folder I also have the python.ipynb notebook that contains nothing special except some python code.

The post shows up but displays the the following output/error:

image

I also tried a page test/test.md with the following content:

---
layout: default
title: Top
permalink: /test/
---

## Top page

Here is a Jupyter Notebook:

{% jupyter_notebook python.ipynb %}

### Raw rendered pages

  * [Raw IPython kernel](python-raw.html)

### Other kernels

  * [IRuby kernel](ruby/)

This gives a similar output:

image

@kou
Copy link
Member

kou commented Jul 17, 2018

I close this issue because you don't provide all files. For example, you don't provide python.ipynb, Gemfile and so on.
I hoped that you provide a repository that contains all files to reproduce this case.

https://github.com/red-data-tools/jekyll-jupyter-notebook/tree/master/example will help you.

@kou kou closed this as completed Jul 17, 2018
@fjp
Copy link
Author

fjp commented Jul 17, 2018

Sorry for not providing the files. I did not do that because the gem is not working with github pages.
However, I uploaded it anyway. You can see the repo here:
https://github.com/fjp/fjp.github.io

And here is the link where the ipython post is missing because of a build error on github:

The page build failed for the master branch with the following error:

The tag jupyter_notebook on line 5 in _posts/2018-07-11-ipython.md is not a recognized Liquid tag. For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error/.

For information on troubleshooting Jekyll see:

https://help.github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can contact us by replying to this email.

When I run this site locally using the following command

Locally I testes with the following command and got the results described above.

DISABLE_WHITELIST=true bundle exec jekyll serve

@fjp
Copy link
Author

fjp commented Jul 17, 2018

Thanks for providing the example I will also try to spot the error why I cannot properly display post which include a jupyter notebook locally.

By comparing the example Gemfile you provided with mine, I saw that the line where the gem is included has an additional path (option?). Is this required?
gem "jekyll-jupyter-notebook", path: ".."

@kou
Copy link
Member

kou commented Jul 18, 2018

Thanks. I could reproduce this case.
You can't use this Jekyll plugin with github-pages gem. Because github-pages gem forces to enable "safe" mode. This plugin doesn't work on "safe" mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants