When I convert Maple expression to Latex, before calling Latex, I replace some math names by strings in order to keep them as is in the generated Latex instead of using Maple own shortened name when conversion to latex().
Later on, in the Latex file, I add \DeclareMathOperator on each long name. This way the long math names remain and it is more clear.
This has been working well for years. Same code. No problems. All my Latex was generated this way.
Except just now, I hit a case where Maple's latex() gives an error when the math has WeierstrassP in it. latex() generates exception.
I will email this also to Maplesoft. But thought to also post it here in case someone can see what the problem is.