[IPython-dev] Static View for the Notebook

Dave Hirschfeld dave.hirschfeld at gmail.com
Thu Aug 9 07:02:58 EDT 2012


MinRK <benjaminrk <at> gmail.com> writes:

> 
> 
> When nbconvert is merged into IPython proper, then handlers will be added for 
nbconvert renderers, which should take care of all of that.
> 
> The result would be akin to running `!nbconvert -f html <notebook.ipynb>`, and 
then visiting files/notebook.html.
> 
> 
> -MinRK
>  

Is this supposed to work on windows? I can't get it to work on my Win32 Python 
2.7.3. I get the following error:


C:\dev\code\nbconvert>nbconvert.py -f html staticHTML.ipynb
Traceback (most recent call last):
  File "C:\dev\code\nbconvert\nbconvert.py", line 1439, in <module>
    main(infile=args.infile[0], format=args.format)
  File "C:\dev\code\nbconvert\nbconvert.py", line 1414, in main
    htmlfname = converter.render()
  File "C:\dev\code\nbconvert\nbconvert.py", line 287, in render
    self.output = self.convert()
  File "C:\dev\code\nbconvert\nbconvert.py", line 277, in convert
    converted_cells.append('\n'.join(conv_fn(cell)))
  File "C:\dev\code\nbconvert\nbconvert.py", line 727, in wrapped
    rendered = f(self, cell)
  File "C:\dev\code\nbconvert\nbconvert.py", line 844, in render_markdown
    p = subprocess.Popen(['markdown'], stdin=subprocess.PIPE, 
stdout=subprocess.PIPE)
  File "C:\dev\bin\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\dev\bin\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

After installing ActivePerl, putting Markdown.pl in the nbconvert directory
and changing line 844 to

  p = subprocess.Popen(['markdown.pl'], ...

I then get a different error:


Traceback (most recent call last):
  File "C:\dev\code\nbconvert\nbconvert.py", line 1439, in <module>
    main(infile=args.infile[0], format=args.format)
  File "C:\dev\code\nbconvert\nbconvert.py", line 1414, in main
    htmlfname = converter.render()
  File "C:\dev\code\nbconvert\nbconvert.py", line 287, in render
    self.output = self.convert()
  File "C:\dev\code\nbconvert\nbconvert.py", line 277, in convert
    converted_cells.append('\n'.join(conv_fn(cell)))
  File "C:\dev\code\nbconvert\nbconvert.py", line 727, in wrapped
    rendered = f(self, cell)
  File "C:\dev\code\nbconvert\nbconvert.py", line 844, in render_markdown
    p = subprocess.Popen(['markdown.pl'], stdin=subprocess.PIPE, 
stdout=subprocess.PIPE)
  File "C:\dev\bin\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\dev\bin\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application


-Dave






More information about the IPython-dev mailing list