instructure/canvas-lms · error
No question type used when trying to parse a qti question
Error message
No question type used when trying to parse a qti question
What it means
assessment_item_converter is an abstract base: parse_question_data is a template method meant to be overridden by type-specific subclasses (multiple_choice, essay, etc.). The base implementation logs and raises because no concrete question-type parser handled the item. It means the QTI item's type could not be classified into a known converter class.
Solutions
- Inspect the QTI XML to see what question_type was detected for the failing item
- Add/extend a subclass in lib/qti/ that supports the missing type, or extend the type-detection mapping
- Preprocess/migrate the source package to a supported QTI type (e.g. convert to multiple_choice)
- Capture the package and report as an importer bug if the type should be supported
Defensive patterns
Strategy: try-catch
Try / catch
begin
converter.parse_question_data
rescue RuntimeError => e
raise unless e.message.start_with?('No question type used')
importer.add_warning(:unknown_question_type, item.identifier)
UnsupportedQuestionSkip.new(item)
end Prevention
- Normalize vendor QTI packages before import
- Map unknown types to a generic fallback converter
- Keep a corpus test of QTI samples covering all supported types
When it happens
Trigger: A QTI <assessmentItem> whose question type maps to no known subclass, so the generic AssessmentItemConverter instance itself has parse_question_data called on it during a QTI import.
Common situations: Importing QTI packages with exotic or vendor-specific question types; malformed <question_type> metadata; a third-party LMS export using types Canvas doesn't recognize.
Understand the failure class
Background: "NotImplementedError: Subclasses should override this method" / "must be implemented" — abstract method errors explained — this error's family across 40 libraries.
Related errors
- Couldn't find QTI Migration Tool. See…
- Subclasses must implement #process_batch when mode is :batch
- Subclasses must implement #process_record when mode is…
- A new_id, '# ', referenced an existing # and the # with #…
- A new_integration_id, '#
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/46dd0d19ab49bdda.
Report an issue: GitHub.
Appendix: source
Thrown at gems/plugins/qti_exporter/lib/qti/assessment_item_converter.rb:69
@href = @package_root.item_path(@manifest_node["href"])
if (title = @manifest_node.at_css("title langstring") ||
@manifest_node.at_css("xmlns|title xmlns|langstring", "xmlns" => Qti::Converter::IMS_MD))
@title = title.text
end
else
@qti_data = opts[:qti_data]
end
@question = { answers: [],
correct_comments: "",
incorrect_comments: "",
question_text: "" }
end
# This should be implemented in the children classes to do the type-specific parsing
def parse_question_data
@log.error "No question type used..."
raise "No question type used when trying to parse a qti question"
end
def create_doc
create_xml_doc
end
def create_xml_doc
@doc = if @manifest_node
Nokogiri::XML(File.open(@href))
else
Nokogiri::XML(@qti_data)
end
end
EXCLUDED_QUESTION_TEXT_CLASSES = ["RESPONSE_BLOCK", "RIGHT_MATCH_BLOCK"].freeze
def create_instructure_question
beginView on GitHub (pinned to 1c9f0bb801)