pystitch / stitch

Write reproducible reports in Markdown
https://pystitch.github.io
MIT License
441 stars 13 forks source link

Can't stitch Bokeh #69

Open Ogaday opened 6 years ago

Ogaday commented 6 years ago

I've been unable to generate reports from stitch markdown containing bokeh plots, even with the example provided in the docs.

I've wrapped up the example in a Dockerfile, but the error codes are the same whether I run it within a Docker container or without.

https://gist.github.com/Ogaday/e4bbc9cf2a6f16ab3f1713d4323ce082

Once you have copied the files to a local directory, you can run

docker build -t minimal_bokeh .
docker run minimal_bokeh

to get the following error message

Traceback (most recent call last):
  File "/opt/conda/envs/bokeh/bin/stitch", line 11, in <module>
    sys.exit(cli())
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/stitch/cli.py", line 60, in cli
    convert(input_text, to, output_file=output_file, extra_args=extra_args)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/stitch/stitch.py", line 476, in convert
    result = stitcher.stitch(source)
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/stitch/stitch.py", line 271, in stitch
    name, messages, attrs,
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/stitch/stitch.py", line 336, in wrap_output
    key = min(all_data.keys(), key=lambda k: order[k])
  File "/opt/conda/envs/bokeh/lib/python3.6/site-packages/stitch/stitch.py", line 336, in <lambda>
    key = min(all_data.keys(), key=lambda k: order[k])
KeyError: 'application/vnd.bokehjs_load.v0+json'

which is a little above my head.

The versions of the libraries I'm using are in the gist.