openlibhums / imports

A plugin for importing content into Janeway.
GNU Affero General Public License v3.0
1 stars 2 forks source link

Error when importing CSV: null value in column "biography" of relation "core_account" violates not-null constraint #102

Closed pgoussy closed 2 weeks ago

pgoussy commented 3 weeks ago

I attempted to import a CSV to create article records in ergo, and I received an unfamiliar error for all articles but two: error: null value in column "biography" of relation "core_account" violates not-null constraint. As far as I can tell, this error popped up for any article whose author didn't already have a Janeway account. See attached example1.csv, as well as message.txt for the complete error list. message.txt example1.csv

I asked about this on Discord, and Andy said "I think it’s due to a change in the underlying model here. The field no longer allows null values and wants empty strings, so we will need to update the import procedure."

I should note that despite these errors, the user accounts and article records were created--but the articles are in the "Unsubmitted" workflow stage, and the user accounts are completely blank aside from the email address. After adding the Janeway IDs to the metadata spreadsheet, I attempted to upload a new CSV with "n/a" in the Author Biography field, in the hopes that this placeholder would allow the rest of the metadata to be imported to update the records/accounts. However, this time I simply received a blank "Server Error" page, without any explanatory error message. See attached example2.csv.

example2.csv

pgoussy commented 2 weeks ago

I was able to successfully import the first CSV that led me to report this error (for the journal ergo) but when I attempted the second CSV (for the journal jgs) I still received the same error message--but only for three articles, whereas previously the error was popping up for all 16 articles in the sheet. I've attached both the CSV in question and the error message I received upon import.

Janeway metadata - JGS Vol. 66 - Metadata (1).csv message2.txt