lanl / LaGriT

Los Alamos Grid Toolbox (LaGriT) is a library of user callable tools that provide mesh generation, mesh optimization and dynamic mesh maintenance in two and three dimensions.
https://lanl.github.io/LaGriT/
Other
122 stars 49 forks source link

python3 incompatibility in ex_refine_edge.py PyLaGriT example #181

Open mhannonj opened 4 years ago

mhannonj commented 4 years ago

The following code subset from the 'ex_refine_edge.py' PyLaGriT example problem (starting at line 32) is incompatible with python 3.x:

if 'The mesh is complete but could not include all points.' in lg.before:

The argument of the if statement needs to be encoded into a "bytes-like object". For this case, it can be done by changing the argument to the following:

if ('The mesh is complete but could not include all points.').encode(encoding='utf-8',errors='strict')) in lg.before:

dharp commented 4 years ago

Thanks for pointing this out! I just fixed this.