sgn
sgn copied to clipboard
CSV uploads fail when created in Excel
Expected Behavior
A breeder came across this issue when using the 'Change Accessions' function from the Trial Detail Page. She created a properly formatted CSV file (correct headings) from Excel. When uploading the file it returns with an error message Could not parse header row
.
It seems MS Excel (on a Mac, at least) writes the CSV file with a file encoding of UTF-8 with BOM
and Windows line endings. Changing the encoding to just UTF-8
with Unix line endings works.
It seems confusing from the user's perspective to be aware of the proper file encoding and line endings in order to upload a file, let alone know how to change this.
For Bugs:
Environment
Steps to Reproduce
I've also come across this issue when uploading pedigrees
I thought I fixed exactly this issue in the pedigree upload, so please let me know if the problem still persists. We need to strip the LR from the line endings in the change accessions upload.
Fixed in #4364
We noticed the issue with using a UTF-8 BOM encoded CSV file ("CSV UTF-8 (Comma delimited)(.csv)" in Excel) with the 'Change Accessions' function from the Trial Detail Page. We get the "Could not parse header row" error message.
The CSV file works fine when saved as "CSV (Comma delimited)(.csv)" in Excel which is encoding the file as regular UTF-8.
We are using the Breedbase docker image V0.79.
Also, when using the 'Change Accessions' function from the Trial Detail Page (with the right encoding (UTF-8) for the CSV file), it looks like the modifications are not 'properly':
- the list of plots on the Trial Detail Page still show the old name, but links to the proper stock details page
- the old accession still has the trial listed in the Experiment Usage of the Accession Details page
- the new accession doesn't have the trial listed in the Experiment Usage of the Accession Details page
Edit: created an issues for this( #4642 )
Hi Martin,
for the Change Accession issue, could you re-run the materialized views to see if the problem goes away, or re-run the trial cache? The latter can be run be opening the Trial Status section and then open the Field Design section in there. That should regenerate that cache.