-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index out of range error #66
Comments
What version of pgfutter? I ask because I had a similar panic on v1.2, but when I built from source it ran fine. There have been a few fixes since v1.2 that may have addressed your issue. |
change to this code for i, col := range record {
cols[i] = strings.Replace(col, "\x00", "", -1)
// bytes.Trim(b, "\x00")
// cols[i] = col
} to for idx, col := range record {
cols[idx] = strings.Replace(col, "\x00", "", -1)
// bytes.Trim(b, "\x00")
// cols[i] = col
} |
I got the same error with a 4MB file, version v1.2. The problem was that the CSV file was malformed, a few rows had extra columns. I discovered this by validating the CSV file here https://csvlint.io/, the output was very helpful. |
Are you guys still looking for a fix? I can help! |
Yes, still seeing this, thank you! |
In linux, for some reason, for some files, you need to have windows style line breaks for it to work. My file had no issues on csvLint except the line-break warning. You can use the unix2dos command to convert the file first, then it worked for me. |
Can confirm that running my CSV that was having the index out of range issue through |
Thank you@waynegraham Can also confirm that running unix2dos on 18GB of tab-delimited files fixed this issue on Linux 👍 This issue isn't 100% consistent. Some files worked as-is (with Unix line breaks), some did not. After running unix2dos on all, they all worked. |
pgfutter crashes when trying to upload large csv file
file can be found here https://www.kaggle.com/c/ieee-fraud-detection
The text was updated successfully, but these errors were encountered: