by Paul Raper.
I have a similar problem. I got the coding error message first, but then after the Cron ran, I got a second message. Unfortubnately I am not able to access the users section of Moodle.
I'm using Moodle 3.7+ and it is a fresh installation.
My server is Ubuntu Linux.