We had this error when I was trying to use django rest swagger in the api we built,
unknown locale: UTF-8
Request Method: GET
Request URL: http://localhost:8000/docs
Django Version: 1.8.2
Exception Type: ValueError
Exception Value:
unknown locale: UTF-8```
We had to set locale to en_US by doing this in the bash profile -
` export LC_CTYPE=en_us `
Then restarted the bash profile using `source` and that solved the problem.
To check if the issue has been solved, on a python shell, do
```import locale```
```locale.getdefaultlocale() ```
It should show you default locale as `en_US` without throwing errors.