Repeating error message in thonny

Hi can anyone interpret this error message from Thonny? Or know a way to suppress it?
** (python.exe:18676): CRITICAL **: ???: assertion ‘len > 0’ failed

in some of my scripts this error message is produced continually until I stop the script. It does not seem to affect performance, but makes it hard to read output as you have to scroll back through so many of the messages.