BEAUTIFY is not designed to take the entire global environment. The problem is that globals() includes all of the web2py HTML helper classes. Because BEAUTIFY is itself an HTML helper, it is serialized by recursively processing its components. The serialization process checks whether a given component has a callable "xml" attribute, and assuming such an attribute is an instance method, it attempts to call .xml(). The problem is the helper classes themselves do have a callable "xml" attribute, but it is not actually an instance method in that case (it is simply an attribute that belongs to the class itself) -- so calling it generates an exception.
You might try something like:
BEAUTIFY({k: v for k, v in globals().iteritems() if not hasattr(v, 'xml')})
But you're probably asking for trouble attempting to display the entire global environment.
Anthony