# Error when exporting vtkjs with paraviewGlance html

**URL:** https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309
**Category:** ParaView Support
**Created:** [May 12, 2020, 9:14am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309 "2020-05-12T09:14:19Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![af11g11](https://discourse.paraview.org/user_avatar/discourse.paraview.org/af11g11/32/4838_2.png) [@af11g11](https://discourse.paraview.org/u/af11g11)
#### Post date: [May 12, 2020, 9:14am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/1 "2020-05-12T09:14:19Z")

</div>

Hi,

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

```auto
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)

Many thanks for any help you can give 🙂

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [May 12, 2020, 2:19pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/2 "2020-05-12T14:19:38Z")

</div>

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.

```auto
# 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,

Seb

---

<div class="post-metadata">

### Author: ![af11g11](https://discourse.paraview.org/user_avatar/discourse.paraview.org/af11g11/32/4838_2.png) [@af11g11](https://discourse.paraview.org/u/af11g11)
#### Post date: [May 12, 2020, 4:10pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/3 "2020-05-12T16:10:52Z")

</div>

Thanks! That worked. Had to open files admin, but it worked 🙂

---

<div class="post-metadata">

### Author: ![rcarneiro](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rcarneiro](https://discourse.paraview.org/u/rcarneiro)
#### Post date: [February 16, 2021, 6:40pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/4 "2021-02-16T18:40:43Z")

</div>

Hi,

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’

Can you please help?

Kind Regards,

RC

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 16, 2021, 7:16pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/5 "2021-02-16T19:16:37Z")

</div>

Hum, it looks like you might be running into some issue with some time handling via your dataset. I’m not sure why.

Just out of curiosity, what do you get with ParaView 5.9?

Is it a simple scene that you export? Is it always happening regardless the content of the scene? Any additional information would be great.

Thanks,

Seb

---

<div class="post-metadata">

### Author: ![rcarneiro](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rcarneiro](https://discourse.paraview.org/u/rcarneiro)
#### Post date: [February 16, 2021, 8:13pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/6 "2021-02-16T20:13:06Z")

</div>

Hi,

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.

RC

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 16, 2021, 8:22pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/7 "2021-02-16T20:22:02Z")

</div>

I’m glad that is working with 5.9. I’m not sure what is happening with 5.8.1. Thanks for reporting the issue though.

---

<div class="post-metadata">

### Author: ![rcarneiro](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rcarneiro](https://discourse.paraview.org/u/rcarneiro)
#### Post date: [February 16, 2021, 8:34pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/8 "2021-02-16T20:34:23Z")

</div>

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?

[ParaViewGlance.html](https://discourse.paraview.org/uploads/short-url/oGgvOfTgnpAc2Kq70usOgn3CeeK.html) (3.3 MB) [ParaViewGlance1.zip](https://discourse.paraview.org/uploads/short-url/lyxdn1Ap7z26vGfTpOYgJwAUMR4.zip) (1.9 MB)

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 17, 2021, 12:53am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/9 "2021-02-17T00:53:57Z")

</div>

There is work in progress to handle time dataset (animation) and right now Glance and PV are not in sync with the capabilities. (That is my guess)

In general, you should use the Glance that is bundled with ParaView.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 17, 2021, 12:57am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/10 "2021-02-17T00:57:31Z")

</div>

FYI @Forrest_Li and @Adrien_Boucaud

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 17, 2021, 1:00am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/11 "2021-02-17T01:00:02Z")

</div>

@rcarneiro could you share the vtkjs instead? That way I’ll be able to test it across various version of Glance.

---

<div class="post-metadata">

### Author: ![rcarneiro](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rcarneiro](https://discourse.paraview.org/u/rcarneiro)
#### Post date: [February 17, 2021, 9:16am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/12 "2021-02-17T09:16:03Z")

</div>

It works better, indeed.

thanks

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 17, 2021, 5:09pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/13 "2021-02-17T17:09:29Z")

</div>

Hum, I was able to load your vtkjs file on all the Glance viewers version (pv-5.9 Glance 4.4.2, Glance 4.9.4 and Glance 4.15.0)

What is the issue that you are seeing?

---

<div class="post-metadata">

### Author: ![rcarneiro](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rcarneiro](https://discourse.paraview.org/u/rcarneiro)
#### Post date: [February 18, 2021, 7:24am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/14 "2021-02-18T07:24:40Z")

</div>

the errors are:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/5/5e30af9016801a0d90b6fc80ab47def9e3bd7501.png)

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 18, 2021, 3:26pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/15 "2021-02-18T15:26:35Z")

</div>

I saw those errors but it seems that the application is fine. It is just that you may have some color map with no scalar range.

As far as I can tell, the application behave the way it is expected regardless of those errors.

---

<div class="post-metadata">

### Author: ![eudoxos](https://discourse.paraview.org/user_avatar/discourse.paraview.org/eudoxos/32/7738_2.png) [@eudoxos](https://discourse.paraview.org/u/eudoxos)
#### Post date: [October 12, 2021, 9:40am UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/16 "2021-10-12T09:40:10Z")

</div>

> [@jourdain](#):
>
> There is work in progress to handle time dataset (animation) and right now Glance and PV are not in sync with the capabilities. (That is my guess)

Could you share some details on animation support? I can’t find anything in docs or elsewhere on the forum.

---

<div class="post-metadata">

### Author: ![Mauricio](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mauricio/32/8839_2.png) [@Mauricio](https://discourse.paraview.org/u/Mauricio)
#### Post date: [March 16, 2022, 11:08pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/17 "2022-03-16T23:08:11Z")

</div>

Thanks this fixed my problem also!

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [March 16, 2022, 11:32pm UTC](https://discourse.paraview.org/t/error-when-exporting-vtkjs-with-paraviewglance-html/4309/18 "2022-03-16T23:32:45Z")

</div>

[https://www.kitware.com/export-paraview-animations-to-paraview-glance-2/](https://www.kitware.com/export-paraview-animations-to-paraview-glance-2/)
