question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.

See original GitHub issue

I read a 16 GB CSV file with pandas. It used to work well, but recently I started hitting this error: ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'. I tried waiting a few days in case it’s a limit of some sort, but it didn’t help. I keep hitting this error.

It used to work well before (the file is read and processed, no issues), so I would expect it to work the same way, as nothing has changed in the code nor in the file.

Is it because of the file size? Am I now hitting some limits or what? What are the limits, if so? Or could the file get corrupted by Google Drive? Some more detailed information would be great.

My browser is: Chrome 81.0.4044.122 (Official Build) (64-bit)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
craigcitrocommented, May 3, 2020

There’s nothing colab-specific here: that error is coming from the library you’re using (I’m guessing pandas?).

I’d try asking on stack overflow.

5reactions
chekoduadarshcommented, Jan 9, 2021

Use the following command to solve the issue if you are using pandas on google colab

df.read_csv('file.csv', encoding='utf8', engine='python')
Read more comments on GitHub >

github_iconTop Results From Across the Web

Python: Error tokenizing data. C error: Calling read(nbytes) on ...
I was able to successfully read the file with following python code: try: df = pd.read_csv(os.path.join(filePath, fileName), sep='|', compression = 'gzip', ...
Read more >
How To Fix pandas.parser.CParserError: Error tokenizing data
CParserError: Error tokenizing data. Understanding why the error is raised and how to deal with it when reading CSV files in pandas.
Read more >
Python: Error tokenizing data. C error: Calling read(nbytes) on ...
Pandas : Python: Error tokenizing data. C error : Calling read ( nbytes ) on source failed with input nzip file [ Beautify...
Read more >
Calling read(nbytes) on source failed. Try engine='pyth的错误 ...
Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='pyth 出现此错误的原因是因为输入文件的路径是文件夹路径,而 ...
Read more >
calling read(nbytes) on source failed. try engine='python ...
parsererror : error tokenizing data. c error: calling read(nbytes) on source failed. try engine='python'. Add Answer | View In TPC Matrix. Technical Problem ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found