title: Internal server error 500 when uploading a CSV file using AJAX
body: <p>I have a very simple web app for uploading CSV files to my server. For that purpose, I'm using AJAX and JQUERY under DJANGO:</p>
  <pre><code>function Upload_Bonds(){
          var csrftoken = getCookie('csrftoken');
          var formData = new FormData(document.getElementById(&quot;formUploadBonds&quot;)); 
          var add_answer = confirm(&quot;Confirm uploading and processing of csv File?&quot; );
          if (add_answer) {
                 $.ajax({
                      url: &quot;/cvs/DealStore/upload_bonds/&quot;, 
                      type: &quot;POST&quot;, 
                      data: formData, 
                      async: false,
                      cache: false,
                      contentType: false,
                      enctype: 'multipart/form-data',
                      processData: false,
                      success: function (data) {
                          $('#message').html(&quot;&lt;p class='text-center text-success font-weight-bold'&gt;Success&lt;/p&gt;&quot;);
                          window.alert(&quot;Data populated, please check the Bonds list table!&quot;);
                       },
                       error: function(data) {
                            $(&quot;#message&quot;).html(&quot;&lt;p class='text-center text-danger font-weight-bold'&gt;Failed&lt;/p&gt;&quot;);
                       }
                     });
                 }
        }    
  </code></pre>
  <p>However, every time I try to use the function, I'm receiving POST 500 (Internal server error). I was able to capture the following on the browser console:</p>
  <p><a href="https://i.stack.imgur.com/bFXSz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bFXSz.png" alt="enter image description here" /></a></p>
  <p>Any idea about how to handle this error? I deployed the app on another server and works fine. So maybe is something about server configuration. (I'm using Linux servers)</p>
  <p>Thanks!</p>