Docker: invalid character ‘U’ looking for beginning of value

When I run docker-machine ls, my DigitalOcean docker droplet can’t be reached and an error is displayed.

That same error, invalid character 'U' looking for beginning of value, appears when running any other docker-machine commands that attempt to contact the docker machine directly.

NAME                 DRIVER         STATE     DOCKER        ERRORS
digitalocean-main    digitalocean   Error     Unknown       invalid character 'U' looking for beginning of value

Source: StackOverflow