To keep users from using the Prolog code to hack into the site, the code is run in a sandbox and in the sandbox only certain predicates are allowed thus the error message.
No permission to call sandboxed <predicate>
Apparently the problem has occurred before and can be fixed with restarting SWISH but I don’t have that ability.