Python: Error tokenizing data. C error: Calling read(nbytes) on source failed with input nzip file
<p>I am using <code>conda</code> <code>python</code> <code>2.7</code></p>

<pre><code>python --version
Python 2.7.12 :: Anaconda 2.4.1 (x86_64)
</code></pre>

<p>I have fallowing method to read large gzip files: </p>

<pre><code>df = pd.read_csv(os.path.join(filePath, fileName),
     sep='|', compression = 'gzip', dtype='unicode', error_bad_lines=False)
</code></pre>

<p>but when I read the file I get the following error: </p>

<pre><code>pandas.parser.CParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.
Segmentation fault: 11
</code></pre>

<p>I read all the existing answers but most of those questions had errors such as additional columns. I was already handling that with <code>error_bad_lines=False</code> option. </p>

<p>What are my options here? </p>

<p>Found something interesting when I tried to uncompress the file: </p>

<pre><code>gunzip -k myfile.txt.gz 
gunzip: myfile.txt.gz: unexpected end of file
gunzip: myfile.txt.gz: uncompress failed
</code></pre>