CSV Import Failure for User accounts

1,457 views
Skip to first unread message

Midiman

unread,
May 7, 2013, 7:49:26 PM5/7/13
to canvas-l...@googlegroups.com
I'm building a local testing demo environment using the Quickstart installation of Canvas. Instructure engineers responded to one of my previous posts regarding enabling SIS imports on this installation. I'm now just getting to the point where I'm needing to create multiple user accounts and I'm running into a snag:

When I upload my UTF-8 CSV text file containing my test user account info, I'm getting an endless loop from the WEBrick server console with the following error message:

WARN  Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

I have to kill the server in order to kill the request as it never completes. 

For clarity I've only got the single admin account created as a result of the initial db population and I'm using the UI to do the SIS import. I'm only trying to create users at this time with a single CSV file called users.csv

The contents of that file are pasted here:

user_id,login_id,password,first_name,last_name,email,status
1000,student01,test123,Test 1,Student 1,test1.student1@myschool.edu,active
1001,student02,test123,Test 2,Student 2,test2.student2@myschool.edu,active
1002,student03,test123,Test 3,Student 3,test3.student3@myschool.edu,active
1003,student04,test123,Test 4,Student 4,test4.student4@myschool.edu,active
1004,student05,test123,Test 5,Student 5,test5.student5@myschool.edu,active
1005,student06,test123,Test 6,Student 6,test6.student6@myschool.edu,active
1006,student07,test123,Test 7,Student 7,test7.student7@myschool.edu,active
1007,student08,test123,Test 8,Student 8,test8.student8@myschool.edu,active
1008,student09,test123,Test 9,Student 9,test9.student9@myschool.edu,active
1009,student10,test123,Test 10,Student 10,test10.student10@myschool.edu,active

Anything wrong with the way I'm doing this? Do I need to have additional data populated prior to getting users imported? I'm only trying 10 accounts at this time...if this is successful I'd like to ramp it up to more users so I can build up and tear down my demonstration installation.

Thanks in advance!

Cody Cutrer

unread,
May 7, 2013, 10:03:21 PM5/7/13
to canvas-l...@googlegroups.com
I've seen the response body length warning in specs before, but it's only been a red herring in the past. Likely requests are continuing to process, as the SIS Import UI continuously does AJAX requests to get the current status of the import. You should be able to navigate to other pages in Canvas to confirm that the server is still responding.

That said, do you have background jobs running? Without delayed jobs, the SIS Import won't be processed. You can start it from the console by doing `script/delayed_job run` or `script/delayed_job start` (the former running it in your terminal, and the latter daemonizing and running in the background). You can verify if you have jobs backed up (and when they process) by visiting /jobs in your browser.

Cody Cutrer
Software Engineer
Instructure


--
 
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Midiman

unread,
May 8, 2013, 10:24:18 AM5/8/13
to canvas-l...@googlegroups.com
Thanks Cody,

It's doing as you say after making sure background jobs are running. Now when I import my file I get this:

The SIS data was imported but with these messages:

  • Errors that prevent importing
    • users.csv - Couldn't find Canvas CSV import headers
I'm assuming that if the format on https://canvas.instructure.com/doc/api/file.sis_csv.html with the first row as the headers is correct, why would this error show up?

Again, the contents of my file are here:
user_id,login_id,password,first_name,last_name,email,status
1000,student01,test123,Test 1,Student 1,test1.student1@myschool.edu,active
1001,student02,test123,Test 2,Student 2,test2.student2@myschool.edu,active
1002,student03,test123,Test 3,Student 3,test3.student3@myschool.edu,active
1003,student04,test123,Test 4,Student 4,test4.student4@myschool.edu,active
1004,student05,test123,Test 5,Student 5,test5.student5@myschool.edu,active
1005,student06,test123,Test 6,Student 6,test6.student6@myschool.edu,active
1006,student07,test123,Test 7,Student 7,test7.student7@myschool.edu,active
1007,student08,test123,Test 8,Student 8,test8.student8@myschool.edu,active
1008,student09,test123,Test 9,Student 9,test9.student9@myschool.edu,active
1009,student10,test123,Test 10,Student 10,test10.student10@myschool.edu,active

I've also attached the file to have anyone else verified it's encoded in UTF-8 properly. 

What now? 

Thanks so much for helping me get this far.
users.csv

Brian Palmer

unread,
May 8, 2013, 10:29:18 AM5/8/13
to canvas-l...@googlegroups.com
Jeffrey,

The users.csv file you attached to the last email has a stray question mark character in the header row before "user_id", so the first column is actually being uploaded as "?user_id", so Canvas can't find the "user_id" column. Try removing that char and re-uploading.

-- Brian



<users.csv>

Midiman

unread,
May 8, 2013, 10:48:05 AM5/8/13
to canvas-l...@googlegroups.com
Thanks Brian,

I didn't notice any stray characters as you mention on my desktop, but believing you to be honest about what you saw, it did trigger the thought about the tool I was using to encode my text files maybe not being encoded properly. I uploaded it to my user account on the Ubuntu Linux VM I'm using and did it there just to be sure it was a tru *nix UTF-8 encoded file. After that it did import properly. 

If I run into any more problems I'll holler back. 

Midiman

unread,
May 8, 2013, 12:43:54 PM5/8/13
to canvas-l...@googlegroups.com
For anyone else wanting to experiment with SIS Imports, I've discovered that Google Docs Spreadsheets can download/export CSV files in UTF-8 encoding by default. It makes for a great cross-platform tool in the cloud to create experimental data. 
Reply all
Reply to author
Forward
0 new messages