Search code examples
djangodeploymentpythonanywhere

Unsupported locale setting while deploying on pythonanywhere


So I just got my website running on pythonanywhere but I get this error:

unsupported locale setting

locale.setlocale(locale.LC_ALL, 'esp_esp')

full traceback: http://dpaste.com/355VD3W


Solution

  • Your locale name is wrong for the platform of pythonanywhere which we can assume is Linux, not Windows, so it's not esp_esp (Windows)

    but rather

    locale.setlocale(locale.LC_ALL, 'es_ES.utf8')  
    

    or

    locale.setlocale(locale.LC_ALL, 'es_ES')