Error "unexpected end of file" while importing a CSV-file

Dimce Tumbov November 3, 2019

Hi there,

 

I have got an error when trying to import a CSV-file with 1673 lines. The complete error message:

"unexpected end of file while reading quoted column beginning on line 1672 and ending on line 1673"

Another test importing the first 10-20 lines works perfectly.

Field separator: TAB

File size: 370 KB

Number of fields: 10

Any ideas?

 

Thanks in advance.

Dimce

1 answer

1 accepted

0 votes
Answer accepted
Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 3, 2019

what is on line 1672 and 1673?

Dimce Tumbov November 4, 2019

Hi Stephen,

 

these are two last lines. This is the content:

2095 Import Tool 8.4 Import Tool H 8.4.3 Ablauf des Importvorgangs -> 8.4.48.4.4 Verwendete Logik bei der Übername der Daten -> 8.4.58.4.4 Verwendete Logik bei der Übername der Daten:"dass sie keine doppelte Einträge" -> "dass Sie keine doppelte Einträge" 1 2 Open
2099 Rechnung Marcus Siegel, Wartung R Praten na 11.01.2019 23.02.2019 1 2 Closed

and once again as a screenshot:

001.jpg

The LF-end of line was also present in the file where it worked but only with 10 lines inside.

 

Cheers,

Dimce

Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2019

@Dimce Tumbov On line 1673 it looks like that the "tab" between 2019 and the 1 is not the a full tab from the screenshot. The system might be having issues with the tabs. I would suggest switching the delimiter to a comma and put long text fields in double quotes. 

Have you tested just the last 10 lines of the CSV? or maybe the middle 10-20 lines?

Try switching the last 10 lines of the CSV to use commas as the delimiter and see if the error is still generated.

Dimce Tumbov November 4, 2019

Hi Stephen, I did several tests with double quotes and comma as delimiter. The common behaviour for all tests is the whole file can not be imported.

Last 10 lines or lines from the middle of the file always worked.

Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2019

Ok, hmmm....

Does the full import work if you remove the last 2 lines? If so, I would suggest just removing those 2 lines and manually creating them.

For those 2 lines, do you have tabs/commas to represent all the columns? You specify that the are 10 fields. From you screenshot and provided data for the 2 lines with issues, I don't see where all 10 columns are represented. Can you provide those two lines with the double quotes and delimited by commas?

Dimce Tumbov November 5, 2019

No it doesn't. The thing is, the same error appears, indicatintg the last two lines:

"unexpected end of file while reading quoted column beginning on line 1648 and ending on line 1649"

If it is of interes, at the first screen of the import-task, there is a warning message:

"The uploaded CSV file contains non-ASCII characters. Make sure you have the correct encoding." (free translation from German)

 

Here are the last two lines as requested:

2081,Support,"Wiedenmann-Seile GmbH, E-Mail am 16.10.18",B,"C:\APPS\CONMAN_DITU\Support\2018\1016\Wiedenmann-Seile GmbH\contractLösung:Option "E-Mail Versand beim Programmstart" abschalten",08.12.2018,1,2,,Closed
2083,Web-Hosting,"Fehlermeldung "Invalid Token"Auf dem PC von Fr. Wolf:1. Anmeldemaske - ok2. Geburtstags-Tool - ok3. Nach dem Schließen des Geburtstags-Tools kommt Fehlermeldung "Invalid Token"Auf dem THOR-Server:Programmstart funktioniert",W,"Fehlermeldung "Invalid Token"Auf dem PC von Fr. Wolf:1. Anmeldemaske - ok2. Geburtstags-Tool - ok3. Nach dem Schließen des Geburtstags-Tools kommt Fehlermeldung "Invalid Token"Auf dem THOR-Server:Programmstart funktioniert einwandfreiLösung:Option "E-Mail Versand beim Programmstart" abschalten26.10.2018:Wiedenmann-Seile GmbH, Fr. Wolf",27.10.2018,1,2,,Closed

Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2019

For the ASCII error, you need to comb through the CSV and remove those. It will cause issues but, it shouldn't cause a complete failure.

As for the last 2 lines.

I copied them to NotePadd++ and saved as CSV. Then I opened the file in excel

  • I see paragraph tags in a couple of the columns, these are examples of the ASCII issue
  • I also see that there is 10 columns for the first row and 11 for the 2nd. This is probably this issue that is causing the total failure. If the number of columns for every row don't match up, it can't import.

Double check these two items and see if that solves the issue.

Dimce Tumbov November 5, 2019

Stephen, issue solved.

The solution was to replace the double quotes inside the columns with a dummy-symbol (-- in my case).

 

Thanks a lot for your support.

Suggest an answer

Log in or Sign up to answer