Octoframes / jupyter_capture_output

A cellmagic that captures celloutput such as text, image or video to files.
https://octoframes.github.io/jupyter_capture_output/
MIT License
31 stars 0 forks source link

Doesn't work with ipyleaflet #15

Open Roald87 opened 1 year ago

Roald87 commented 1 year ago

For example when running the following code

from ipyleaflet import Map, basemaps, basemap_to_tiles
import jupyter_capture_output

%%capture_img --path "canada.png"
m = Map(
    basemap=basemap_to_tiles(basemaps.CartoDB.Positron),
    center=(51, -120),
    zoom=6,
    )
m

It says Output saved by creating file at canada.png., but no image appears in the working directory.

$ pip freeze
anyio==4.0.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.3.0
async-lru==2.0.4
attrs==23.1.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
branca==0.6.0
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
comm==0.1.4
debugpy==1.6.7.post1
decorator==5.1.1
defusedxml==0.7.1
executing==1.2.0
fastjsonschema==2.18.0
fqdn==1.5.1
idna==3.4
ipykernel==6.25.1
ipyleaflet==0.17.3
ipython==8.15.0
ipywidgets==8.1.0
isoduration==20.11.0
jedi==0.19.0
Jinja2==3.1.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
jupyter-capture-output==0.0.11
jupyter-events==0.7.0
jupyter-lsp==2.2.0
jupyter_client==8.3.1
jupyter_core==5.3.1
jupyter_server==2.7.3
jupyter_server_terminals==0.4.4
jupyterlab==4.0.5
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.8
jupyterlab_server==2.24.0
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
mistune==3.0.1
nbclient==0.8.0
nbconvert==7.8.0
nbformat==5.9.2
nest-asyncio==1.5.7
notebook_shim==0.2.3
overrides==7.4.0
packaging==23.1
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
platformdirs==3.10.0
prometheus-client==0.17.1
prompt-toolkit==3.0.39
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.16.1
python-dateutil==2.8.2
python-json-logger==2.0.7
PyYAML==6.0.1
pyzmq==25.1.1
referencing==0.30.2
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.10.0
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
stack-data==0.6.2
terminado==0.17.1
tinycss2==1.2.1
tornado==6.3.3
traitlets==5.9.0
traittypes==0.2.1
uri-template==1.3.0
urllib3==2.0.4
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.2
widgetsnbextension==4.0.8
xyzservices==2023.7.0
kolibril13 commented 1 year ago

Hi @Roald87!

Thanks for opening this issue! You're using an ipywidget, and capturing images from widgets is currently not supported from this package.

But I think that @stevejpurves is currently working on something that will make this possible in context of Myst Markdown.