title: flask app error: failed to load external entity. cannot input xml file for parsing
body: <p>A python script which parses xml file runs independently fine but when it is called via views.py in flask it throws error. Even trying to parse xml file from views.py itself it throws error. Following are a couple of lines of code which throws error:</p>
  
  <pre><code> from lxml import etree
   doc1=etree.parse('file.xml')
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>IOError: Error reading file 'file.xml': failed to load external entity "file.xml"
  </code></pre>