Forums | Mahara Community
CSV Import fails
05 February 2009, 14:42
I just upgraded to 1.09 and when I try to upload users via CSV I get an error that states:
The field name "username" is invalid
I have made sure it is utf-8 and that there aren't any problems with the import file according to Mahara documentation.
05 February 2009, 18:22Hi - how did you create the CSV file? In Excel? If so, Excel has a nasty habit of putting non-breaking spaces in some fields when saved as CSV. You might want to open the file in a text editor, and make sure you clean out any spaces in the file.
06 February 2009, 9:15It was created in OO Calc but I cleaned it up in Notepad++ so there wasn't anything untoward left in it.
06 February 2009, 19:52Did that fix the issue for you? I think Richard committed a fix to 1.1 so that this problem won't happen again, by the way.
16 September 2011, 8:52
I have the same problem with a UTF-8 file and the error: The field name "username" is invalid, or you have more fields than your header row specifies. In Mahara 1.4.o
I've opened it in Notepad to check for spaces and stuff but it just looks OK:
Does anybody have any idea?
16 September 2011, 18:47
I copied the two lines into a new text document, saved that as csv file, and uploaded it to demo.mahara.org. It worked flawlessly. Could you please try there yourself (I deleted the account so that this wouldn't pose a problem)?
19 September 2011, 2:02
Thanks for your quick feedback. I've uploaded the original file in demo.moodle.org as well and it works OK. I still get the same error on my installation though.
I'm using version 1.4.0, and considering it is probably a local issue, I will check with local tech support if they can fix the problem.
19 September 2011, 15:20
I hope your techies can solve the issue. It very much sounds like something is wrong on your install.
20 September 2011, 9:01My techie tells me I can't upload any users in Mahara through csv because we have a direct coupling with Moodle... I can add users in Mahara only 1 at a time, so I'm confused... Is this a known restriction? Is he right? Thanks in advance...
21 September 2011, 23:33
Mahara won't stop you from uploading new users via csv just because you have SSO with Moodle.
But he might just be offering you some good advice - in most SSO setups, a new user coming in from Moodle for the first time will create a brand new Mahara user, even if the owner of the Moodle account already has a Mahara account. There are ways to avoid this, but it takes a bit of admin work beforehand (associating peoples' Moodle usernames with their Mahara accounts).