When exporting a scene from ParaView for use with ParaView Glance I seem to be running into trouble. My workflow is:
exportScene > “name”.vtkjs > click cog and select paraviewGlance HTML (save textures had both on & off)
I get the error with:
Both Paraview Version 5.8.0 and the nightly build v5.8.0-680-g92ad34aa43
Paraview Glance npm version 4.9.4
Have reproduced on 2 different machines
Generic Warning: In C:\bbd\ecd3383f\build\superbuild\paraview\src\Remoting\Export\vtkPVWebExporter.cxx, line 97
Failed to bundle vtkjs data file into HTML viewer
Traceback (most recent call last):
File "C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\vtkmodules\web\vtkjs_helper.py", line 50, in addDataToViewer
for line in srcHtml:
File "C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1032: character maps to <undefined>
A vtkjs file is produced which can be loaded into ParaView Glance and this seems to work fine. The HTML file is also produced, but this does not render in chrome or firefox.
Is there any way to fix this, or an update I need to do?
When exporting without link to HTML is fine. Although, all of the pipelines in the view set their visibility to on which is a bit of a pain (any way to remedy this would also be appreciated)
My guess it is a small glitch that is specific to Python 3. The code should be fixable on your side.
Try editing the file "C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\vtkmodules\web\vtkjs_helper.py" by adding the encoding argument like below.
# Create new output file
with open(srcHtmlPath, mode='r', encoding="utf-8") as srcHtml:
with open(dstHtmlPath, mode='w', encoding="utf-8") as dstHtml:
Please let me know if that fixed the issue for you.
Thanks,
I am using using ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit and I am facing a similar problem when I try to export scene as .vtkjs with or without the link to .html file.
It works with Paraview v.5.7.0
the error message is:
Generic Warning: In C:\bbd\8fbebceb\build\superbuild\paraview\src\Remoting\Export\vtkPVWebExporter.cxx, line 63
Failed to import paraview.web.vtkjs_helper module.
Traceback (most recent call last):
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\web\vtkjs_helper.py”, line 1, in
from paraview import simple
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\simple.py”, line 41, in
from paraview import servermanager
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 3374, in
__initialize()
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 3365, in __initialize
c = Connection(iter.GetCurrentSessionId(), iter.GetCurrentSession())
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 2039, in init
_createModules(self.Modules)
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 2712, in _createModules
m.filters = createModule(‘filters’)
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 2815, in createModule
cobj = _createClass(groupName, proxyName, apxm=pxm)
File “C:\Program Files\ParaView 5.8.1-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\servermanager.py”, line 2759, in _createClass
if (prop.GetInformationOnly() and propName != “TimestepValues”
AttributeError: ‘NoneType’ object has no attribute ‘GetInformationOnly’
Thanks for the support. There’s nothing special about the dataset. It corresponds to a steady case simulation results and I selected some fields like temperature and velocity to be exported to the .html file.
The error message doesn’t show up with Paraview 5.9 (exactly the same state file). I was able to export and visualize the data.
One last question, what is the most appropriate/last html file to use in the exporting process?
Something interesting happened, if I use an old version of the html file I can visualize correctly the data (ParaViewGlance.html) but I use the a version I downloaded today I cannot visualize my dataset on the browser (ParaViewGlance1.html).
Do you know the reason for that or am I missing something?