Mesh import error: unsupported operand type(s) for |: 'dict' and 'dict'

From the 2D cylinder example:

(base) arvind@ATM:~/Documents/work/randomStuff/pyfr_examples/inc_cylinder_2d$ zcat inc_cylinder_2d.msh.gz | pyfr import -tgmsh - inc_cylinder_2d.pyfrm
Traceback (most recent call last):
  File "/home/arvind/anaconda3/bin/pyfr", line 8, in <module>
  File "/home/arvind/anaconda3/lib/python3.8/site-packages/pyfr/", line 117, in main
  File "/home/arvind/anaconda3/lib/python3.8/site-packages/pyfr/", line 131, in process_import
    mesh = reader.to_pyfrm(args.lintol)
  File "/home/arvind/anaconda3/lib/python3.8/site-packages/pyfr/readers/", line 23, in to_pyfrm
    mesh = self._to_raw_pyfrm(lintol)
  File "/home/arvind/anaconda3/lib/python3.8/site-packages/pyfr/readers/", line 413, in _to_raw_pyfrm
    return mesh.get_connectivity() | mesh.get_shape_points(lintol)
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

I also tried importing the mesh after decompressing it in a separate step, but I get the same error. I would appreciate any help!

I believe this is due to fact that you are running with Python 3.8, while PyFR has a hard requirement for Python 3.9+. See here for PyFR dependencies.

I would recommend using Anaconda which currently ships with Python 3.9.

1 Like