I'm not sure if this works as I don't get your error on my phone, so I'm sorry if it doesn't work.
Hope this helps
#Store the number as a string
#Find the index of the ".", or ","
#Put each group of 3 digits of the integer part in a list
#Delete an empty group (don't know why it occurs)
#Add the groups to a new string, each followed by "," (or ".", if you want)
#Add the remaining fractional part
#For this example, this should return 12,345,678,910.424548693