title: lxml.etree iterparse does not accept a HDFS file path
body: <p>I would like to process a huge xml file that is distributed across a HDFS file system, using the <code>iterparse</code> function from <code>lxml.etree</code> package.</p>
  <p>I have tried it locally and on an Amazon's EMR cluster:</p>
  <ul>
  <li><strong>Locally</strong> : the address of my xml file is <code>hdfs://localhost:9000/user/hadoop/history.xml</code></li>
  <li><strong>EMR cluster</strong> : the address is <code>/user/hadoop/history.xml</code></li>
  </ul>
  <p>In both cases, running my simple python program crashes with the following error</p>
  <pre><code>Traceback (most recent call last):
    File &quot;xml_parser.py&quot;, line 18, in &lt;module&gt;
      main()
    File &quot;xml_parser.py&quot;, line 12, in main
      for event, elem in ET.iterparse(inputFile, tag='page'):
    File &quot;src/lxml/iterparse.pxi&quot;, line 78, in lxml.etree.iterparse.__init__
  FileNotFoundError: [Errno 2] No such file or directory: &lt;file_path&gt;
  </code></pre>
  <p>Here is my python program</p>
  <pre><code>import sys
  import lxml.etree as ET
  from pyspark import SparkContext
  from pyspark.sql import SparkSession
  
  
  
  def main():
      sc = SparkContext()
      spark = SparkSession(sc)
      inputFile = sys.argv[1]
      for event, elem in ET.iterparse(inputFile, tag='page'):
          elem.clear()
      print('finished')
  
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>