vega / vegafusion

Serverside scaling for Vega and Altair visualizations
https://vegafusion.io
BSD 3-Clause "New" or "Revised" License
303 stars 15 forks source link

diagnose ci issue #412

Closed jonmmease closed 8 months ago

jonmmease commented 8 months ago

Trying to debug the CI failure in https://github.com/hex-inc/vegafusion/pull/411

__________________ test_it[vegalite-layer_bar_fruit.vg.json] ___________________

category = 'vegalite', name = 'layer_bar_fruit.vg.json'

    @pytest.mark.duckdb
    @pytest.mark.parametrize(
        "category,name", load_test_cases())
    def test_it(category, name):

        maybe_skip(category, name)

        # Load spec into dict
        file = spec_dir / category / name
        spec = json.loads(file.read_text("utf8"))

        # Define local timezone
        local_tz = "America/New_York"

        # Pre-transform with DataFusion connection and convert to image
        vf.runtime.set_connection("datafusion")
        (transformed, _) = vf.runtime.pre_transform_spec(spec, local_tz)
>       img_datafusion = imread(BytesIO(vega_to_png(transformed)))
E       ValueError: Vega to PNG conversion failed:
E       Error: Failed to locate text in SVG:
E       
E       <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100" height="100">
E           <text x="20" y="50" font-size="10" font-family="sans-serif">🍊</text>
E       </svg>
E       ["Group(Group { id: \"\", transform: Transform { sx: 1.0, kx: 0.0, ky: 0.0, sy: 1.0, tx: 0.0, ty: 0.0 }, opacity: NormalizedF32(FiniteF32(1.0)), blend_mode: Normal, isolate: false, clip_path: None, mask: None, filters: [] })"]
E           at Object.sg.textMetrics.width (<anon>:17:[45](https://github.com/hex-inc/vegafusion/actions/runs/6743284134/job/18331217031?pr=411#step:8:46))
E           at https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:1988:36
E           at truncate (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:1993:9)
E           at textValue (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:1976:45)
E           at process (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:3563:28)
E           at visit (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:1358:9)
E           at SVGStringRenderer.mark (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:3593:13)
E           at https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:3572:[46](https://github.com/hex-inc/vegafusion/actions/runs/6743284134/job/18331217031?pr=411#step:8:47)
E           at visit (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:1358:9)
E           at process (https://cdn.skypack.dev/-/vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1/dist=es2020,mode=imports,min/optimized/vega-scenegraph.js:3[57](https://github.com/hex-inc/vegafusion/actions/runs/6743284134/job/18331217031?pr=411#step:8:58)2:17)