conda-forge / vega-cli-feedstock

A conda-smithy repository for vega-cli.
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

vg2pdf and vg2png fail with TypeError: Cannot read property 'getContext' of null #2

Open eharkins opened 4 years ago

eharkins commented 4 years ago

Issue: vg2png and vg2pdf both fail;

running

curl -L https://raw.githubusercontent.com/vega/vega/master/docs/examples/bar-chart.vg.json > test.json
vg2pdf test.json > test.pdf

(also with vg2png) gives:

TypeError: Cannot read property 'getContext' of null
    at resize (/opt/conda/lib/vega-cli/node_modules/vega-scenegraph/build/vega-scenegraph.js:3377:26)
    at CanvasRenderer.prototype$6.resize (/opt/conda/lib/vega-cli/node_modules/vega-scenegraph/build/vega-scenegraph.js:3427:5)
    at CanvasRenderer.prototype$4.initialize (/opt/conda/lib/vega-cli/node_modules/vega-scenegraph/build/vega-scenegraph.js:2989:17)
    at CanvasRenderer.prototype$6.initialize (/opt/conda/lib/vega-cli/node_modules/vega-scenegraph/build/vega-scenegraph.js:3422:28)
    at initializeRenderer (/opt/conda/lib/vega-cli/node_modules/vega-view/build/vega-view.js:630:8)
    at renderHeadless (/opt/conda/lib/vega-cli/node_modules/vega-view/build/vega-view.js:736:12)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async View.renderToCanvas [as toCanvas] (/opt/conda/lib/vega-cli/node_modules/vega-view/build/vega-view.js:771:15)

See https://github.com/altair-viz/altair_saver/issues/13 for previous efforts to troubleshoot this. Wondering if it has anything to do with the difference between my env and that in which the vega-cli-feedstock CI tests happen.

Thanks!
Environment (conda list):

``` (base) root@26f2720fc1fa:/# conda list # packages in environment at /opt/conda: # # Name Version Build Channel _libgcc_mutex 0.1 main altair 4.0.1 py_0 conda-forge altair_data_server 0.4.1 py_0 conda-forge altair_saver 0.1.0 py_1 conda-forge altair_viewer 0.2.0 py_0 conda-forge attrs 19.3.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge biopython 1.76 py38h516909a_0 conda-forge bleach 3.1.1 py_0 conda-forge ca-certificates 2019.11.28 hecc5488_0 conda-forge certifi 2019.11.28 py38_0 conda-forge cffi 1.13.2 py38h8022711_0 conda-forge chardet 3.0.4 py38_1003 conda-forge conda 4.8.2 py38_0 conda-forge conda-package-handling 1.6.0 py38h516909a_1 conda-forge cryptography 2.8 py38h72c5cf5_1 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge entrypoints 0.3 py38_1000 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.9 py_1 conda-forge importlib_metadata 1.5.0 py38_0 conda-forge ipykernel 5.1.4 py38h5ca1d4c_0 conda-forge ipython 7.13.0 py38h5ca1d4c_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge jedi 0.16.0 py38_0 conda-forge jinja2 2.11.1 py_0 conda-forge jsonschema 3.2.0 py38_0 conda-forge jupyter_client 6.0.0 py_0 conda-forge jupyter_core 4.6.3 py38_0 conda-forge ld_impl_linux-64 2.33.1 h53a641e_8 conda-forge libblas 3.8.0 14_openblas conda-forge libcblas 3.8.0 14_openblas conda-forge libedit 3.1.20181209 hc058e9b_0 libffi 3.2.1 hd88cf55_4 libgcc-ng 9.1.0 hdf63c60_0 libgfortran-ng 7.3.0 hdf63c60_5 conda-forge liblapack 3.8.0 14_openblas conda-forge libopenblas 0.3.7 h5ec1e0e_6 conda-forge libsodium 1.0.17 h516909a_0 conda-forge libstdcxx-ng 9.1.0 hdf63c60_0 libuv 1.34.0 h516909a_0 conda-forge markupsafe 1.1.1 py38h516909a_0 conda-forge mistune 0.8.4 py38h516909a_1000 conda-forge nbconvert 5.6.1 py38_0 conda-forge nbformat 5.0.4 py_0 conda-forge ncurses 6.1 he6710b0_1 nodejs 13.9.0 h10a4023_0 conda-forge notebook 6.0.3 py38_0 conda-forge numpy 1.18.1 py38h95a1406_0 conda-forge openssl 1.1.1d h516909a_0 conda-forge pandas 1.0.1 py38hb3f55d8_0 conda-forge pandoc 2.9.2 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.6.1 py_0 conda-forge pexpect 4.8.0 py38_0 conda-forge pickleshare 0.7.5 py38_1000 conda-forge pip 20.0.2 py_2 conda-forge portpicker 1.3.1 py38_0 anaconda prometheus_client 0.7.1 py_0 conda-forge prompt_toolkit 3.0.3 py_0 conda-forge ptyprocess 0.6.0 py_1001 conda-forge pycosat 0.6.3 py38h516909a_1002 conda-forge pycparser 2.19 py_2 conda-forge pygments 2.5.2 py_0 conda-forge pyopenssl 19.1.0 py_1 conda-forge pyrsistent 0.15.7 py38h516909a_0 conda-forge pysocks 1.7.1 py38_0 conda-forge python 3.8.1 h0371630_1 anaconda python-dateutil 2.8.1 py_0 conda-forge pytz 2019.3 py_0 conda-forge pyzmq 19.0.0 py38h1768529_0 conda-forge readline 7.0 h7b6447c_5 requests 2.23.0 py38_0 conda-forge ruamel_yaml 0.15.87 py38h7b6447c_0 anaconda selenium 3.141.0 py38h516909a_1000 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 45.2.0 py38_0 conda-forge six 1.14.0 py38_0 conda-forge sqlite 3.31.1 h7b6447c_0 anaconda terminado 0.8.3 py38_0 conda-forge testpath 0.4.4 py_0 conda-forge tk 8.6.8 hbc83047_0 toolz 0.10.0 py_0 conda-forge tornado 6.0.3 py38h516909a_4 conda-forge tqdm 4.36.1 py_0 traitlets 4.3.3 py38_0 conda-forge urllib3 1.25.7 py38_0 conda-forge vega-cli 5.6.0 0 conda-forge vega-lite-cli 3.4.0 0 conda-forge wcwidth 0.1.8 py_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.34.2 py_1 conda-forge xz 5.2.4 h14c3975_4 yaml 0.1.7 had09818_2 zeromq 4.3.2 he1b5a44_2 conda-forge zipp 3.0.0 py_0 conda-forge zlib 1.2.11 h7b6447c_3 ```


Details about conda and system ( conda info ):

``` (base) root@26f2720fc1fa:/# conda info active environment : base active env location : /opt/conda shell level : 1 user config file : /root/.condarc populated config files : conda version : 4.8.2 conda-build version : not installed python version : 3.8.1.final.0 virtual packages : __glibc=2.28 base environment : /opt/conda (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /opt/conda/pkgs /root/.conda/pkgs envs directories : /opt/conda/envs /root/.conda/envs platform : linux-64 user-agent : conda/4.8.2 requests/2.23.0 CPython/3.8.1 Linux/4.9.125-linuxkit debian/10 glibc/2.28 UID:GID : 0:0 netrc file : None offline mode : False ``` Dockerfile for [image pushed to quay.io as eharkins/altair:conda](https://quay.io/repository/eharkins/altair?tab=tags): ``` FROM continuumio/miniconda3:4.7.12 RUN conda install --quiet --yes python=3.8 notebook altair altair_saver biopython --channel conda-forge --channel anaconda && conda clean --all -f -y COPY jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py ```
tildekarthik commented 4 years ago

Have the same issue Tried reinstalling several times