instructure/canvas-lms · error · ImportError

No name given for institutional tag category #

Error message

No name given for institutional tag category #{sis_id}

What it means

Raised by SisImports::InstitutionalTagCategoryImporter#add_institutional_tag_category when a category row from the SIS import has a category_id (sis_id) but an empty/blank name. The importer validates each required column before touching the database, and name is mandatory for every institutional tag category. The sis_id is interpolated into the message so the offending row can be located in the import file.

Solutions

  1. Locate the row with the interpolated sis_id in the institutional_tag_categories CSV and fill in a non-blank name.
  2. Check the SIS import mapping/scope so the name column is actually bound to the name argument.
  3. If the category should be removed, set status to deleted instead of blanking the name.
  4. Re-run the SIS import after fixing the file.

Example fix

// before
add_institutional_tag_category('cat-1', nil, 'desc', 'active')
// after
add_institutional_tag_category('cat-1', 'Department Tags', 'desc', 'active')
Defensive patterns

Strategy: validation

Validate before calling

raise ArgumentError, 'name is required' if name.blank?
add_institutional_tag_category(sis_id, name, description, status)

Try / catch

begin
  importer.add_institutional_tag_category(sis_id, name, description, status)
rescue SisImports::ImportError => e
  Rails.logger.warn("Skipping category #{sis_id}: #{e.message}")
end

Prevention

When it happens

Trigger: Calling add_institutional_tag_category(sis_id, name, description, status) with name set to nil, '' or whitespace-only; a CSV row in the institutional_tag_categories SIS file where the name column is empty; a mapping/scope that binds the wrong column into name so it arrives blank.

Common situations: Hand-edited or partially exported SIS CSVs missing the name column; import templates with a name header but empty cells; upstream HR/ERP exports that omit names for inactive categories; column-order changes after a template update so name is fed an empty value.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15). Data as JSON: /api/errors/34ec8ce952a8a8ee. Report an issue: GitHub.

Appendix: source

Thrown at lib/sis/institutional_tag_category_importer.rb:43

      yield importer
      SisBatchRollBackData.bulk_insert_roll_back_data(importer.roll_back_data)
      importer.success_count
    end

    class Work
      attr_accessor :success_count, :roll_back_data

      def initialize(batch, root_account, logger)
        @batch = batch
        @root_account = root_account
        @logger = logger
        @success_count = 0
        @roll_back_data = []
      end

      def add_institutional_tag_category(sis_id, name, description, status)
        raise ImportError, "No category_id given for an institutional tag category" if sis_id.blank?
        raise ImportError, "No name given for institutional tag category #{sis_id}" if name.blank?
        raise ImportError, "No status given for institutional tag category #{sis_id}" if status.blank?
        raise ImportError, "Improper status \"#{status}\" for institutional tag category #{sis_id}" unless /\A(active|deleted)/i.match?(status)
        return if @batch.skip_deletes? && /deleted/i.match?(status)

        category = InstitutionalTagCategory.find_by(root_account_id: @root_account.id, sis_source_id: sis_id)
        category ||= InstitutionalTagCategory.new(account: @root_account,
                                                  root_account: @root_account,
                                                  sis_source_id: sis_id)

        category.name = name
        category.description = description
        category.sis_batch_id = @batch.id
        category.workflow_state = /deleted/i.match?(status) ? "deleted" : "active"

        if category.save
          data = SisBatchRollBackData.build_data(sis_batch: @batch, context: category)
          @roll_back_data << data if data
          @success_count += 1

View on GitHub (pinned to 1c9f0bb801)