As a thank you, here's my humble contribution to the community.
I myself have struggled with string, where it had to be a number.
Apparently I wasn't the first, see these posts:
I tried the above solution of adding a zero to the string (string + 0), but then the error popped up somewhere else in the code.
I was working with sentences loaded from a tinyDB from where I had to extract a number, which was then obviously a string.
Applied the trick string+0 and stored that in a list.
As I then had to bubble-sort that list, the + sign was the problem.
I kept patching the code by adding variables and stuf to get it working.
But that was a big detour.
So I quickly created this small extension to deal with this problem, and to stop using tricks like +0 or *1.
(I updated the extension to comply with the naming conventions)
I know, and I used that trick but that does not work in all cases, so I quickly build this extension for myself and problem solved.
In some cases the program does not accept a "+" or "*" sign in the code.
Believe me, I once had this error and I spent all day looking for a solution so I got fed up with it.
Now, when I get this error, I simply put this tiny block in and problem solved.
Please include all the information you have provided in these posts, including the new version of the extension which follows the naming conventions, into the main post, and we will list it.