Forum .LRN Q&A: Re: bulk upload problem...

5: Re: bulk upload problem... (response to 1)
Posted by Stan Kaufman on
Bulk user upload will generate this error if you put in a bogus csv file. For instance, if you include an incorrect type ("staff" not "admin") in this file:


you get this error in the transaction abort routine:

invalid database id:  "nsdb0"
    while executing
"ns_db dml $dbh "abort transaction""
    (procedure "db_transaction" line 115)
    invoked from within
"db_transaction {

    oacs_util::csv_foreach -file $file_location -array_name row {

        # First make sure the required data is there

        if ..."
    ("uplevel" body line 46)
    invoked from within
"uplevel {
#  Copyright (C) 2001, 2002 MIT
#  This file is part of dotLRN.
#  dotLRN is free software; you can redistribute it and/or modi..."
    (procedure "code::tcl::/var/web/dotLRN-dev/packages/dotlrn/www/admin/use..." line 2)
    invoked from within
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {


This is on a fresh install this morning (cvs tags oacs-4-6-1-b2 and dotlrn-1-0). Seems to me that users who make a mistake in the format of their csv user list files should get a useful error and not a bomb.