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

blank page when using -to slides #91

Closed
agilly opened this issue Aug 30, 2015 · 5 comments
Closed

blank page when using -to slides #91

agilly opened this issue Aug 30, 2015 · 5 comments
Assignees
Labels
format:Slides pertains to exporting to the Slides format

Comments

@agilly
Copy link

agilly commented Aug 30, 2015

Hi,

I'm experiencing an issue that I think has been fixed, I may just not be able to link to the proper version of reveal.js

When I do ipython nbconvert Untitled6.ipynb --to slides --post serve --reveal-prefix http://cdn.jsdelivr.net/reveal.js/2.6.2, everything works fine, but if I use ipython nbconvert --to slides --post serve --reveal-prefix http://cdn.bootcss.com/reveal.js/3.1.0, I see a blank screen.

Now I've tried downloading the master and dev branches and adding them locally (e.g. --reveal-prefix "reveal.js-dev" ), but I get the same result.

The reason I want to access a newer version of reveal.js is maybe a bit trivial: I'd like to use the black theme, which doesn't seem to be available in 2.6.2.

@damianavila
Copy link
Member

Which version of IPython/Jupyter or nbconvert are you using? the problem with Reveal.js > 3 is that now the library is loaded in a different way... so it would not work with our previous implementations... we have fix that in this repo and if you use Jupyter 4.0 you will be using Reveal.js 3.1 by default... BUT, you need to be aware that darkish themes do not work well with the notebook css, so probably using a theme like "black" will not work without further customization on the css...

@damianavila damianavila added the format:Slides pertains to exporting to the Slides format label Aug 30, 2015
@agilly
Copy link
Author

agilly commented Aug 30, 2015

I'm using python 2.7.10 / Anaconda 2.3.0 (x86_64), and IPython 4.0.0 (nbconvert the same).
I'm not sure which version of reveal.js is used when I don't specify a prefix, I think it is still 2.6.2:
[NbConvertApp] Redirecting reveal.js requests to https://cdn.jsdelivr.net/reveal.js/2.6.2

When I select the black theme, I get:

ERROR:tornado.application:Uncaught exception GET /reveal.js/css/theme/black.css (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8000', method='GET', uri='/reveal.js/css/theme/black.css', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6', 'Accept-Encoding': 'gzip, deflate, lzma, sdch', 'Host': '127.0.0.1:8000', 'Accept': 'text/css,*/*;q=0.1', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174', 'Dnt': '1', 'Connection': 'keep-alive', 'Referer': 'http://127.0.0.1:8000/Untitled6.slides.html?theme=black'})
Traceback (most recent call last):
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/web.py", line 1369, in _stack_context_handle_exception
    raise_exc_info((type, value, traceback))
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/nbconvert/postprocessors/serve.py", line 31, in finish_get
    response.rethrow()
  File "/Users/ag15/anaconda/lib/python2.7/site-packages/tornado/httpclient.py", line 583, in rethrow
    raise self.error
HTTPError: HTTP 404: Not Found
ERROR:tornado.access:500 GET /reveal.js/css/theme/black.css (127.0.0.1) 743.77ms

When I select the "night" one, there is no error but the background refuses to change (stays white). Which css file should I change to fix that?

@damianavila
Copy link
Member

Here is the commit changing the url for reveal 3.1: aecc6c2
but the change is not released yet... it is on master... so you need to run master or wait for the next release.
About the css fixes, I have not explored yet which changes are needed (I have done some exploration in the past with the default theme which is also dark)... you probably need to investigate further... essentially the more important fix is probably deal with the notebook white background... but I guess there are some others as well.
I will try to take a look later and give you some input above what to change...

@astrojuanlu
Copy link

For those still getting this issue, this is the prefix that worked for me as of today:

jupyter nbconvert "file.ipynb" --to slides --reveal-prefix "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.1.0"

No need of --post serve after this.

@damianavila
Copy link
Member

Current version of nbconvert 5.2.1 is loading reveal.js 3.1.0 when you are using --post serve.
As @Juanlu001 said above, you can use a remote reveal.js to bypass the --post serve or a local reveal.
Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:Slides pertains to exporting to the Slides format
Projects
None yet
Development

No branches or pull requests

3 participants