title: Given error even when text in file: UserWarning: loadtxt: Empty input file: "Stock.txt"
body: <p>When I load a file using <code>numpy.loadtxt</code>, I get this funny warning:</p>
  <p><code>UserWarning: genfromtxt: Empty input file: &quot;stocks.text&quot;</code></p>
  <p>Here is a minimal example showing the problem:</p>
  <pre><code>import numpy as np
  fl = open('stocks.txt', 'w')
  fl.write(&quot;GME : 1\nSPY : 2\nBBBY : 3\n&quot;)
  file_contents = np.genfromtxt('stocks.txt', delimiter=':')
  </code></pre>
  <p>Please can someone help with this error? I'm trying to build graphs by taking values out of the txt file</p>