# Fedora 36 and math text (MaskParser is not initialized!)

**URL:** https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [November 10, 2022, 7:45pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721 "2022-11-10T19:45:09Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kgreen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/c0e974/32.png) [@kgreen](https://discourse.paraview.org/u/kgreen)
#### Post date: [November 10, 2022, 7:45pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/1 "2022-11-10T19:45:09Z")

</div>

Hi! On Fedora 36, I’m unable to use LaTeX math fonts for any string.

When using the package:  
paraview.x86\_64 5.10.0-0.4.fc36  
I get the errors:

> ERROR: In /builddir/build/BUILD/ParaView-v5.10.0/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx, line 984  
> vtkMatplotlibMathTextUtilities (0x55aa49684830): MaskParser is not initialized!
> 
> ERROR: In /builddir/build/BUILD/ParaView-v5.10.0/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx, line 515  
> vtkMatplotlibMathTextUtilities (0x55aa49684830): MaskParser is not initialized!
> 
> ERROR: In /builddir/build/BUILD/ParaView-v5.10.0/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx, line 984  
> vtkMatplotlibMathTextUtilities (0x55aa49684830): MaskParser is not initialized!
> 
> ERROR: In /builddir/build/BUILD/ParaView-v5.10.0/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx, line 515  
> vtkMatplotlibMathTextUtilities (0x55aa49684830): MaskParser is not initialized!

And when building from source (master branch)  
(using `cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release ../paraview`)  
I get similar errors:

> ERROR: In vtkMatplotlibMathTextUtilities.cxx, line 1087  
> vtkMatplotlibMathTextUtilities (0x4091e80): MaskParser is not initialized!
> 
> ERROR: In vtkMatplotlibMathTextUtilities.cxx, line 518  
> vtkMatplotlibMathTextUtilities (0x4091e80): MaskParser is not initialized!
> 
> ERROR: In vtkMatplotlibMathTextUtilities.cxx, line 1087  
> vtkMatplotlibMathTextUtilities (0x4091e80): MaskParser is not initialized!
> 
> ERROR: In vtkMatplotlibMathTextUtilities.cxx, line 518  
> vtkMatplotlibMathTextUtilities (0x4091e80): MaskParser is not initialized!

Any thoughts on how to resolve this would be appreciated. I haven’t had any luck on my own search.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 11, 2022, 12:56pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/2 "2022-11-11T12:56:24Z")

</div>

Is this using ParaView itself? I wonder if Fedora builds without Matplotlib support (seems so looking at the spec file)? Your build is almost certainly without it though; you’d need `VTK_MODULE_ENABLE_VTK_RenderingMatplotlib=ON`).

---

<div class="post-metadata">

### Author: ![kgreen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/c0e974/32.png) [@kgreen](https://discourse.paraview.org/u/kgreen)
#### Post date: [November 11, 2022, 9:52pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/3 "2022-11-11T21:52:12Z")

</div>

Yes, this is while in paraview. It’s the error output in the popup “Output Messages” box when I try to do something like set the xlabel of an axis to `$x$`.

Unfortunately, when I use that option (`-DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib=YES`) I still get the same error when building with this option. Does Matplotlib have to be setup in a specific way on the system?

---

<div class="post-metadata">

### Author: ![kgreen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/c0e974/32.png) [@kgreen](https://discourse.paraview.org/u/kgreen)
#### Post date: [November 12, 2022, 3:11am UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/4 "2022-11-12T03:11:36Z")

</div>

Watching things in the debugger, it looks like it’s this call that’s failing inside vtk: [VTK/vtkMatplotlibMathTextUtilities.cxx at 468bf785a4dac90a796565edff650d651a4d32dd · Kitware/VTK · GitHub](https://github.com/Kitware/VTK/blob/468bf78/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx#L179)  
leading to the error messages that I’ve pasted above.

At my limits for understanding what’s going on in here (for now). Just posting this update in case anyone else knows a quick fix.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 12, 2022, 8:40pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/5 "2022-11-12T20:40:56Z")

</div>

I wonder if there isn’t a `matplotlib` API change we’re affected by. I remember something about this name being deprecated, optional, or something, but that’s about it.

---

<div class="post-metadata">

### Author: ![kgreen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/c0e974/32.png) [@kgreen](https://discourse.paraview.org/u/kgreen)
#### Post date: [November 12, 2022, 11:34pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/6 "2022-11-12T23:34:32Z")

</div>

Good insight. Yes, that seems to be the case.

matplotlib v3.5.3:

> <https://github.com/matplotlib/matplotlib/blob/v3.5.3/lib/matplotlib/mathtext.py#L384>

v3.6.0 (what I’m on in Fedora 36):

> <https://github.com/matplotlib/matplotlib/blob/v3.6.0/lib/matplotlib/mathtext.py#L185>

Looks like they’ve made some changes to how they represent mathtext in the backend, including removing the `bitmap` backend.

I’m going to try downgrading my matplotlib, rebuilding with v3.5.3 to see if that works.

---

<div class="post-metadata">

### Author: ![kgreen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/c0e974/32.png) [@kgreen](https://discourse.paraview.org/u/kgreen)
#### Post date: [November 12, 2022, 11:57pm UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/7 "2022-11-12T23:57:56Z")

</div>

That worked! Using matplotlib v3.5.3, I can use math formatting in strings.

That’s a good enough fix for me for now, but moving forward, I guess we just bring this to the attention of the VTK devs to update their code (VTK/master uses the same call as VTK/468bf78).

_ **Note: changing your matplotlib version does NOT require a rebuild of paraview** _

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 14, 2022, 12:23am UTC](https://discourse.paraview.org/t/fedora-36-and-math-text-maskparser-is-not-initialized/10721/8 "2022-11-14T00:23:32Z")

</div>

VTK has had an issue for a while; it’s important now: [https://gitlab.kitware.com/vtk/vtk/-/issues/18517](https://gitlab.kitware.com/vtk/vtk/-/issues/18517)
