Skip to content

export html fails with latest version 2.8.16Β #87

@theweaklink

Description

@theweaklink

Hi there,

it looks like the latest release from 2 hours ago (2.8.16) introduces some regression when exporting a 3D scene to HTML. Until now, any apps exporting a 3D was working fine (2.8.15) and I now get this error stack:

    p.export_html(
  File "/onecode/env/lib/python3.11/site-packages/pyvista/plotting/plotter.py", line 644, in export_html
    write_html(data, buffer)
  File "/onecode/env/lib/python3.11/site-packages/trame_vtk/tools/vtksz2html.py", line 17, in write_html
    with open(HTML_VIEWER_PATH, mode="r", encoding="utf-8") as srcHtml:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/onecode/env/lib/python3.11/site-packages/trame_vtk/tools/static_viewer.html'

something related to file packaging maybe?

To reproduce the problem, the simple export html will do (from docs here):

import pyvista as pv
from pyvista import examples
mesh = examples.load_uniform()
pl = pv.Plotter(shape=(1, 2))
_ = pl.add_mesh(mesh, scalars='Spatial Point Data', show_edges=True)
pl.subplot(0, 1)
_ = pl.add_mesh(mesh, scalars='Spatial Cell Data', show_edges=True)
pl.export_html('pv.html')

hope it helps.
thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions