title: How to resolve error from requests.post() call Segmentation Fault (core dumped)?
body: <p>I'm sending image to my server for further processing. I'm using Python's <code>requests</code> library:</p>
  <pre><code>path='/home/mark/Pictures/mike.jpeg'
  
  pdb.set_trace()
  image = {'image': open(path, 'rb')}
  response = requests.post('http://localhost/image/upload', files=image)
  if response:
      print(response)
  </code></pre>
  <p>when I step through it with debugger it shows me:</p>
  <pre><code>/home/mark/front_end_android/venv/lib/python3.7/site-packages/requests/api.py(119)post()
  -&gt; return request('post', url, data=data, json=json, **kwargs)
  Segmentation fault (core dumped)
  </code></pre>
  <p>The image is a standard jpeg file. What am I doing wrong here ?</p>
  <p><strong>Update:</strong></p>
  <p>I found this report from nginx:</p>
  <pre><code>nginx_1     | 2020/10/21 10:22:29 [warn] 19#19: *3 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000002, client: 172.18.0.1, server: , request: &quot;POST /image/upload HTTP/1.1&quot;, host: &quot;localhost&quot;
  </code></pre>
  <p>^ Does this mean that the image is being held by Nginx proxy ?</p>
  <p>Logs from the server:</p>
  <pre><code>nginx_1     | 2020/10/21 10:22:29 [warn] 19#19: *3 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000002, client: 172.18.0.1, server: , request: &quot;POST /image/upload HTTP/1.1&quot;, host: &quot;localhost&quot;
  users_1     | 172.18.0.4 - - [21/Oct/2020 10:22:29] &quot;POST /image/upload HTTP/1.0&quot; 500 -
  nginx_1     | 172.18.0.1 - - [21/Oct/2020:10:22:29 +0000] &quot;POST /image/upload HTTP/1.1&quot; 500 39060 &quot;-&quot; &quot;python-requests/2.24.0&quot; &quot;-&quot;
  </code></pre>