cancel
Showing results for 
Search instead for 
Did you mean: 
princekagame
Community Participant

Importing failure

Jump to solution

Hi,

I am trying to upload the enrollment file and it is giving the following error message. 

300781_111.PNG

Could you please help me.

Thank you,

Prince

1 Solution

Accepted Solutions
James
Community Champion

 @princekagame ,

The Invalid UTF-8 error means that the file you're sending has some special characters in it, but you have not encoded your file with UTF-8 encoding. What you need to do is either track down the stray character and remove it or keep it and tell Canvas that the file is UTF-8 encoded.

The top of the SIS Import Format Documentation has a note that says "All text should be UTF-8 encoded." Saying that should happen doesn't mean that it is automatic. It means that you need to make sure that it is.

For schools in the United States, this is not usually a problem because most of our names fall into the ASCII range, which is a subset of UTF-8 and doesn't need any special encoding. The only time I ran into an issue was when someone put an emoji in a course name or copy/pasted a title from Microsoft Word.

However, given the official languages of Rwanda, it seems likely that some of the names may have special characters in them. When that happens and there are special characters in a file, you need to make sure that it is UTF-8 encoded.

The enrollments.csv file itself doesn't include any names, it only includes codes to other files. We only use numbers an ASCII characters in our file. In fact, all of our IDs are the letters A-Z, digits 0-9, dash, and underscore. That makes it very computer friendly for us as some of the older programming languages we use don't have great support for UTF-8 or Unicode characters. Planning your SIS codes out ahead of time can save a bunch of headache later on. Given the questions you're having and the filenames that you're using, it looks like you are getting emailed files from someone else who may not completely understand what needs to happen. I strongly encourage you to test these things to your beta instance of Canvas: How do I access the Canvas beta environment as an admin? 

Also, make sure you're using the Canvas Admin Guide. There is a section there on SIS imports and one of the documents is https://community.canvaslms.com/docs/DOC-12585-4214164118  That document won't explain the UTF-8 error, but it's still a good reference.

As for your UTF-8 error, without knowing what program you're using to create the CSV file, it's going to be difficult to tell you exactly how to fix that error.

If you are using Excel to generate it, then when you go to save the file, choose Save As instead of Save. It will give a list of file types that are available and you need to choose that to recognize UTF-8. Here's what my version of Excel looks like.

300987_pastedImage_3.png

The default for a new Excel file is the "Excel Workbook" (in green at the top). The default for a CSV file is CSV (at the bottom of my image). You would want to change it to CSV UTF-8 (highlighted in blue).

The file names suggest that someone is emailing you files that you're then processing. You might encourage them to name the files based off the contents. That will make it easier for you to keep track of which one is which.

View solution in original post

4 Replies
James
Community Champion

 @princekagame ,

The Invalid UTF-8 error means that the file you're sending has some special characters in it, but you have not encoded your file with UTF-8 encoding. What you need to do is either track down the stray character and remove it or keep it and tell Canvas that the file is UTF-8 encoded.

The top of the SIS Import Format Documentation has a note that says "All text should be UTF-8 encoded." Saying that should happen doesn't mean that it is automatic. It means that you need to make sure that it is.

For schools in the United States, this is not usually a problem because most of our names fall into the ASCII range, which is a subset of UTF-8 and doesn't need any special encoding. The only time I ran into an issue was when someone put an emoji in a course name or copy/pasted a title from Microsoft Word.

However, given the official languages of Rwanda, it seems likely that some of the names may have special characters in them. When that happens and there are special characters in a file, you need to make sure that it is UTF-8 encoded.

The enrollments.csv file itself doesn't include any names, it only includes codes to other files. We only use numbers an ASCII characters in our file. In fact, all of our IDs are the letters A-Z, digits 0-9, dash, and underscore. That makes it very computer friendly for us as some of the older programming languages we use don't have great support for UTF-8 or Unicode characters. Planning your SIS codes out ahead of time can save a bunch of headache later on. Given the questions you're having and the filenames that you're using, it looks like you are getting emailed files from someone else who may not completely understand what needs to happen. I strongly encourage you to test these things to your beta instance of Canvas: How do I access the Canvas beta environment as an admin? 

Also, make sure you're using the Canvas Admin Guide. There is a section there on SIS imports and one of the documents is https://community.canvaslms.com/docs/DOC-12585-4214164118  That document won't explain the UTF-8 error, but it's still a good reference.

As for your UTF-8 error, without knowing what program you're using to create the CSV file, it's going to be difficult to tell you exactly how to fix that error.

If you are using Excel to generate it, then when you go to save the file, choose Save As instead of Save. It will give a list of file types that are available and you need to choose that to recognize UTF-8. Here's what my version of Excel looks like.

300987_pastedImage_3.png

The default for a new Excel file is the "Excel Workbook" (in green at the top). The default for a CSV file is CSV (at the bottom of my image). You would want to change it to CSV UTF-8 (highlighted in blue).

The file names suggest that someone is emailing you files that you're then processing. You might encourage them to name the files based off the contents. That will make it easier for you to keep track of which one is which.

View solution in original post

jlubkinchavez
Community Participant

If I save the file as CSV UTF-8, the SIS Import no longer recognizes the column headers. Instead I save as plain CSV and hunt down and replace the problematic characters (typically accents or "bad" apostrophes in names).

ametto
Community Participant

I had the same problem with my SIS import for my university, i am using office 13 and i saved everything in order but still got the error, i found this fix worked.

The error comes as a result of extra characters in the excel document such as commas, full stops etc. a csv file uses these  characters so when they are not placed in the right way they mess up the csv file and the system cant read the data.  commas and fullstops should be in between text or numbers  eg( ab.c.2020) the system will read this as data in a cell if you use (ab. )in a cell in a csv the fullstop will throw off the system when trying to read the data. 

if you go thru the excel file and spot full stops or commas where they are not supposed to be delete them then save as csv and import. in my case i had a full stop on one of the course names (long name). I did a find and replace in that entire column. (find (.) leave the  replace textbox empty . This is a shortcut for when you are dealing with large data. 

I hope this works for you or any other person experiencing such challanges

348500_pastedImage_1.png

To avoid this errors make sure the data doesn't have extra characters at the end of the data in a cell

tchilt
Community Participant

I have this issue, too. Saving as UTF-8 in Excel breaks the headers. Has anyone found a solution for this?