title: Django: UnicodeDecodeError while trying to read template 500.html
body: <p>I am trying to deploy my django application to a production environment with AWS Elastic Beanstalk. In my staging environment, where I have <code>DEBUG=True</code>, everything is fine, but when <code>DEBUG=False</code> I am getting the error <code>UnicodeDecodeError while trying to read template /home/docker/code/django-app/templates/500.html</code></p>
  
  <p>Here is my <code>500.html</code> template:</p>
  
  <pre><code>{% extends "base.html" %} 
  {% load i18n %}
  
  {% block title_html %}{% trans 'Server error (500)' %}{% endblock %}
  
  {% block content %} 
      &lt;h1&gt;{% trans 'Server Error &lt;em&gt;(500)&lt;/em&gt;' %}&lt;/h1&gt; 
      &lt;p&gt;
          {% trans "There has been an error. It's been reported to the site administrators and should be fixed shortly. Thank you for your patience." %}
      &lt;/p&gt;
  
  {% endblock %}
  </code></pre>