mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.53k stars 1.15k forks source link

Unexpected token < with worker #661

Open kevinch opened 5 years ago

kevinch commented 5 years ago

While setting worker to true, i get a Uncaught SyntaxError: Unexpected token <

My call is fairly simple:

Papa.parse(csvfile, {
  complete: this.updateData,
  skipEmptyLines: true,
  header: true,
  worker: true,
})

This is the data of the file:

id status value accountId creditValue createdAt resolvedAt updatedAt originalDueDate dueDate observation transactionId creditAccountId orderId
8350E7BB48874616A7F4F2A99A7418AA-01 Opened 33.34 14443385797_CPF 0 2019-04-08T00:26:30.8095722Z   2019-04-16T01:51:47.0816431Z 2019-05-08T00:26:30.7875095Z 2019-05-08T00:26:30.7875095Z   8350E7BB48874616A7F4F2A99A7418AA 14443385797_CPF 785900
78dd719793c644dfb35b17b654cf4fb6-01 Opened 0.1 38b25263ac954aaea358a40a5a085c11 0 2019-04-08T00:35:48.0187831Z   2019-04-16T01:19:43.3945357Z 2019-05-08T00:35:48.0168256Z 2019-05-08T00:35:48.0168256Z   78dd719793c644dfb35b17b654cf4fb6 38b25263ac954aaea358a40a5a085c11  

It works fine with the worker disabled. I'm using "papaparse": "^4.6.3", with react 16.

pokoli commented 5 years ago

Could you upload the file as attachment? Otherwise is dificult to reproduce the issue and thus provide a fix.

kevinch commented 5 years ago

@pokoli there you go. test.csv.zip