title: os.walk error of unhandled stopIteration
body: <p>I have written a python script and wanted to debug it using eric ide. When I was running it, an error popped up saying <code>unhandled StopIteration</code></p>
  
  <p>My code snippet:</p>
  
  <pre><code>datasetname='../subdataset'
  dirs=sorted(next(os.walk(datasetname))[1])
  </code></pre>
  
  <p>I am new to python and so, I don't really know how to fix this. Why is this error popping up and how do I fix it?</p>