Import cannot proceed

well,

I tried to Sync users from a CSV file, I used libreoffice to have a good csv file and it didn’t succeed.

Did someone already encountered this problem, how could i solved it ?

Thank you for your ideas !

Didier,

I have had a look at this issue, but cannot recreate it with the file you sent me. The CSV file is accepted by the system, with no MIME-type issues. However, it does not work because the text files need to be enclosed with ". Eg. it should not be:

Mr.,Someone,

But:

“Mr.”,“Someone”.

I am left wondering why you are having the MIME type issue. I will email you back the file, as saved on my computer: please see if my version solves the MIME type issue.

In the meantime, why OS and browser are you using?

Ross

Hi Ross,

I also faced a similar challenge when importing users into Gibbon. In my own case, Gibbon was only able to insert data from just one of the rows in the entire csv file - only the entry on the first row was imported. I tried one more time by first removing the entry that has been entered and tried importing the rest of the entries. I got the same result as the previous one - only the topmost entry was entered. You may take a look at a extract of the csv file below:

“”,“OGUNBOWALE”,“ADEOLA”,“ADEOLA”,“OGUNBOWALE A.O”,“F”,“Teacher2”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“ANJORIN”,“ADEYEMI”,“ADEYEMI”,“ANJORIN AM”,“M”,“Teacher3”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“AIGBOMIAN”,“AMBROSE”,“AMBROSE”,“AIGBOMIAN AA”,“M”,“Teacher4”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“AKINROLABU”,“BABATUNDE”,“BABATUNDE”,“AKINROLABU BO”,“M”,“Teacher5”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“ADEYEMI”,“BABATUNDE”,“BABATUNDE”,“ADEYEMI B.A”,“M”,“Teacher6”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“DADA”,“BASHIR”,“BASHIR”,“DADA BB”,“M”,“Teacher7”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“OKECHUKWU”,“BOSE”,“BOSE”,“OKECHUKWU B M”,“F”,“Teacher8”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
“”,“AZEEZ”,“BUKKY”,“BUKKY”,“AZEEZ B.K”,“F”,“Teacher9”,“”,“”,“Teacher”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”

Please what could be the reason for this and what can do to move on from here? I use Gibbon on WAMP (Windows machine).

Update:

I saw the following after hitting the submit button:
Step 2 - Data Check & Confirm
Prepare Database Tables
The database was successfully locked.
File Import
All users could be read and used, so the import will proceed.
Check & Insert
User Teacher2 was successfully created with password (the default password I set).
Yet, only “Teacher2” was imported.

Daniel,

Gibbon’s imports are a little picky in terms of formatting. Have you looked at this guide for importing:

https://gibbonedu.org/support/administrators/importing-users-into-gibbon/

Thanks,

Ross

Sorry, it took a little long before I responded. Internet is bad for quite some days now and I couldn’t go online.

Now, I looked at the importing guide before I attempted importing into Gibbon. I even downloaded LibreOffice just so that I can use the LibreOffice Calc that you recommended! I did everything as the manual instructed. I used the sample ods file to prepare the csv file in Libreoffice. Yet, I got the same result that I indicated above.

Currently, I have found a way of importing users and other mass data into gibbon: I insert csv data directly into the database (the appropriate table) using PHPMyAdmin. I even included the hashed password of all the users: I wrote a PHP code to generate the hashed passwords. Everything is now working as it ought to. (Interestingly, I prepared the csv using MS Excel). I was able to achieve my aim, but that is not the best because, i will handover the application to users who are not computer programmers. They will not be able to do all of those things I did. The appropriate thing is that the importing feature should be able to work correctly right from within the GUI.

As for me, I will study the code for import in the gibbon core to see which part of it is responsible for the limited import. But I will appreciate if you look into this to make any necessary adjustment.

Thanks.

Daniel,

Hmmm, that is interesting. Your solution is very creative! Can you email your CSV file to support@gibbonedu.org so that I can test it out myself?

Thanks,

Ross

I will. Just a moment please.

I have forwarded the csv file to the email address you provided.

Daniel,

Thanks for the file, with which I could replicate the issue. After testing it, I opened your file in LibreOffice and did this:

Selected all cells
Formatted all cells to text
Save As CSV, selecting Edit Filter Settings
In Filter Settings selected to Quote all text cells

Then the import worked fine.

The only difference I can see if I view the 2 files in a text editor is that yours has blank cells enclosed in quotes, where mine does not:

Yours: "","",""
Mine: ,,

Not sure why this would make a difference, or how it happened.

I have emailed you back the working file.

Hey Ross,

I tested the file you sent and all the users were imported as they ought to. Maybe the reason for which the previous file imported only one user (the topmost entry) is because it enclosed blank cells in quotes, whereas the new one does not:

Old: “”,“”,“”
New: ,

I will make sure that empty cells are no longer enclosed in quotes then. Well, since I have LibreOffice, I will recommend it for the next administrator.

Thank a lot.

Hello,
I also had this error and resolved it by switching the import process from a Windows workstation to Linux [Ubuntu 1404]. I used Libreoffice on both machines and used the same options when I saved the files.
I am currently using Gibbon Core 11 stable.

Thanks to the developers for your hard work,
Dave

Dave,

Welcome to the Gibbon community, and thanks for adding to this thread: it is great to have new users coming in and sharing their experiences and expertise.

For future reference, importing from Windows should work, it just requires LibreOffice, and following the instructions below:

https://gibbonedu.org/support/administrators/%20import

Thanks,

Ross