title: pyscreenshot.err.FailedBackendError: All backends failed
body: <p>I am a newbie to python web apps.</p>
  
  <p>I'm using pythonanywhere to host my webapp.
  Pyscreenshot is installed via <code>pip3.8 install --user Pillow pyscreenshot</code> </p>
  
  <p>I am using ajax to call a function on button click which uses pyscreenshot to take screenshot of the screen and store it as an image file on given path.</p>
  
  <p>Everything runs fine on local environment (manjaro, python3.8) </p>
  
  <p>However when I run the same code on pythonanywhere, I get an unhandled exception on the site.
  In the error logs I see the following:</p>
  
  <pre><code>2020-06-16 11:30:09,927: Exception on /takess [GET]
  Traceback (most recent call last):
    File "/usr/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
      response = self.full_dispatch_request()
    File "/usr/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/usr/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
      raise value
    File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
      rv = self.dispatch_request()
    File "/usr/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "/home/Muhammadpen/mysite/flask_app.py", line 12, in takess
      im = ImageGrab.grab()
    File "/home/Muhammadpen/.local/lib/python3.8/site-packages/pyscreenshot/__init__.py", line 31, in grab
      return backend_grab(backend, bbox, childprocess)
    File "/home/Muhammadpen/.local/lib/python3.8/site-packages/pyscreenshot/loader.py", line 147, in backend_grab
      return auto(bbox, childprocess)
    File "/home/Muhammadpen/.local/lib/python3.8/site-packages/pyscreenshot/loader.py", line 127, in auto
      raise FailedBackendError(msg)
  pyscreenshot.err.FailedBackendError: All backends failed!
  </code></pre>
  
  <p>Here is the code:</p>
  
  <p>Index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Inspector jitsi&lt;/title&gt;
    &lt;/head&gt;
    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type=text/javascript&gt;
      $(function() {
        $('a#ssbutton').bind('click', function() {
          $.getJSON('/takess',
              function(data) {
            //do nothing
          });
          return false;
        });
      });
  &lt;/script&gt;
    &lt;body&gt;
      &lt;iframe
        src="https://meet.jit.si/"
        style="height: 900px; width: 100%;"
      &gt;&lt;/iframe&gt;
      &lt;div class='container'&gt;
            &lt;form&gt;
                &lt;a href=# id=ssbutton&gt;&lt;button class='btn btn-default'&gt;Take screenshot&lt;/button&gt;&lt;/a&gt;
            &lt;/form&gt;
  
    &lt;/div&gt;
    &lt;/body&gt;
    &lt;style&gt;
      html,
      body {
        overflow: hidden;
        margin: 0px;
        padding: 0px;
      }
      form{
        position: absolute;
        left: 50%;
        z-index: 0;
      }
    &lt;/style&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>app.py:</p>
  
  <pre><code>from flask import Flask, render_template
  import pyscreenshot as ImageGrab
  
  app = Flask(__name__)
  
  @app.route('/')
  def index():
      return render_template("index.html")
  
  @app.route('/takess')
  def takess():
      im = ImageGrab.grab()
      im.save(r'/home/Muhammadpen/mysite/ss1.png')
      # im.save(r'/home/pen/Documents/ss1.png')
  
  
  if __name__ == "__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>I cant find any relevant info or fixes about this, so any help will be appreciated. Ty!  </p>