Comments (16)
Yep, remember that there is no error if there is a typo.
--ServerPostProcessor.ip='*' # wrong
--ServePostProcessor.ip='*' #right
you wrote an extra r
:-)
from nbconvert.
OK let's close it again...
Perhaps we could add some docs here about how to change the port:
http://nbconvert.readthedocs.io/en/latest/usage.html#convert-revealjs
from nbconvert.
If you want to serve on another port I would suggest just converting to slides and then firering a real http server (python -m http.server <port>
) IIRC listen on all interfaces.
The post --server is really just for convenience, and building extra config option is a slippery slope that will becomme too complex./
from nbconvert.
Problem with that is that it doesn't render the slides correctly. It renders like a flat HTML file.
from nbconvert.
Problem with that is that it doesn't render the slides correctly. It renders like a flat HTML file.
Hum indeed. apparently it does not work anymore, the code use a tornado proxy to map reveal.js location.
Fortunately the flags are already there (we all learn things everyday) !
$ jupyter nbconvert --to slides --ServePostProcessor.port=8910 --ServerPostProcessor.ip='*' --post serve <mynotebook.ipynb>
# [Edit, extra r read ServerPostProcessor above]
Maybe --help-all
should list the flags of all pre/post-processors ? @damianavila
from nbconvert.
I ran this:
jupyter nbconvert "notebook.ipynb" --to slides --post serve --ServerPostProcessor.ip="0.0.0.0"
and got this error:
Traceback (most recent call last):
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\Scripts\jupyter-nbconvert-script.py", line 5, in <module>
main()
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\traitlets\config\application.py", line 592, in launch_instance
app.start()
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 286, in start
self.convert_notebooks()
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 409, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 382, in convert_single_notebook
self.postprocess_single_notebook(write_results)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\nbconvertapp.py", line 367, in postprocess_single_notebook
self.postprocessor(write_results)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\postprocessors\base.py", line 28, in __call__
self.postprocess(input)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\nbconvert\postprocessors\serve.py", line 87, in postprocess
http_server.listen(self.port, address=self.ip)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\tornado\tcpserver.py", line 126, in listen
sockets = bind_sockets(port, address=address)
File "C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3\lib\site-packages\tornado\netutil.py", line 187, in bind_sockets
sock.bind(sockaddr)
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
Using and ip address of '*' still only serves the pages on the local host ip address.
from nbconvert.
Hum. works for me but I'm on master. We might have had a recent bugfix to fix that. What if you use another port ?
from nbconvert.
Working for me with latest released nbconvert..
from nbconvert.
I'm using Anaconda. Here's is the output of conda info jupyter
:
jupyter 1.0.0 py34_0
--------------------
file name : jupyter-1.0.0-py34_0.tar.bz2
name : jupyter
version : 1.0.0
build number: 0
build string: py34_0
channel : defaults
size : 2 KB
date : 2015-08-13
license : BSD
md5 : 5db5a3d83d2440686158466e6bbd4ce5
installed environments:
C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3
dependencies:
ipykernel 4.0.3
ipywidgets 4.0.2
jupyter_console
nbconvert
notebook
python 3.4*
qtconsole
I was able to finally resolve my issue by editing the serve.py
file in nbconvert to have the ip address of 0.0.0.0
. It's a temporary fix.
Here is what I was able to get from running conda info nbconvert
:
nbconvert 4.0.0 py34_0
----------------------
file name : nbconvert-4.0.0-py34_0.tar.bz2
name : nbconvert
version : 4.0.0
build number: 0
build string: py34_0
channel : defaults
size : 307 KB
date : 2015-08-13
license : BSD
md5 : 54a272cad6289ec1e03b2dd04c9497ec
installed environments:
C:\Users\KronoSKoderS\AppData\Local\Continuum\Anaconda3
dependencies:
ipython
jinja2
jupyter_core
mistune
nbformat
pygments
python 3.4*
traitlets
from nbconvert.
I should also note, that running:
ipython nbconvert "notebook.ipynb" --to slides --post serve --ServerPostProcessor.ip="0.0.0.0"
works, but doesn't do anything with changing the ip address.
from nbconvert.
I think this is related with this: #103 (comment)
Maybe something win-specific??
from nbconvert.
@KronoSKoderS can you test if jupyter/jupyter_core#54 fix this issue as well?
from nbconvert.
I spoke a little too soon and tested in an unclean environment. I had made a custom change to serve.py in nbconvert/postprocessors like so:
class ServePostProcessor(PostProcessorBase):
"""Post processor designed to serve files
Proxies reveal.js requests to a CDN if no local reveal.js is present
"""
open_in_browser = Bool(True, config=True,
help="""Should the browser be opened automatically?"""
)
reveal_cdn = Unicode("https://cdn.jsdelivr.net/reveal.js/2.6.2", config=True,
help="""URL for reveal.js CDN."""
)
reveal_prefix = Unicode("reveal.js", config=True, help="URL prefix for reveal.js")
ip = Unicode("0.0.0.0", config=True, help="The IP address to listen on.") #CHANGED SOMETHING HERE!!!!
port = Int(8000, config=True, help="port for the server to listen on.")
Running the following command:
jupyter nbconvert --to slides --ServePostProcessor.port=8910 --ServerPostProcessor.ip='*' --post serve <mynotebook.ipynb>
get's us half way there. The IP address does not change, however the port does.
from nbconvert.
@Carreau @minrk ideas? maybe some trailets related issue? mmm...
from nbconvert.
Well technically I did by bad copy pasting.
from nbconvert.
Well technically I did by bad copy pasting.
My bad too... OK let's close it again...
from nbconvert.
Related Issues (20)
- Support `pandas.Styler` object HOT 3
- nbconvert fails when notebook contains empty "Raw NBConvert"cell
- error: Execution was interrupted, reason: internal c++ exception breakpoint(-5)
- nbconvert to PDF fails if there are two adjacent spaces in the filename (MacOS)
- Convert to MyST HOT 1
- Word wrapping for print view in HTML output
- Can someone help me out with why my images wont display on my pdf print
- Error in docs example: Using nbconvert as a library: KeyError: 'template_paths' HOT 1
- Section numbering in HTML
- Nbconvert >= 7.14 produces error in Sphinx build HOT 9
- Allow pre-fetching of css files? HOT 2
- matplotlib widgets not interactive when exported to html
- Rendering to HTML generates an error in bleach.clean HOT 5
- No way to disable traceback colors when executing notebook HOT 1
- Jupyter Magic stops `CellExecutionError` handling from working
- jupyter/nbconvert/templates only has latex HOT 5
- Unable to convert .ipynb to .pdf on Mac
- Erreur with date metadata
- Export to PDF with bengali language failed
- Error with ucs package when exporting .ipynb to pdf file HOT 2
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 nbconvert.