instructure/canvas-lms · error · Canvas::Migration::Error
No outcome file or guid given
Error message
No outcome file or guid given
What it means
Canvas::Migration::Error raised by AcademicBenchmark::OutcomeData.load_data when the options hash contains neither :archive_file nor :authority/:publication keys, so there is no source for the outcome data.
Solutions
- Pass an uploaded file: load_data(archive_file: file_or_path).
- Or pass API identifiers: load_data(authority: abrv) and/or publication: guid.
- If you have a guid, translate it into the authority/publication options the loader expects.
- Pre-check options before calling: ensure options[:archive_file] || options[:authority] || options[:publication].
Example fix
// before OutcomeData.load_data(guid: 'abc') // after OutcomeData.load_data(archive_file: attachment.open) # or authority: 'XYZ'
Defensive patterns
Strategy: validation
Validate before calling
unless opts[:archive_file] || opts[:authority] || opts[:publication] raise ArgumentError, 'need archive_file or authority/publication' end OutcomeData.load_data(opts)
Try / catch
begin
data = AcademicBenchmark::OutcomeData.load_data(opts)
rescue Canvas::Migration::Error => e
Rails.logger.warn("outcome load skipped: #{e.message}")
data = nil
end Prevention
- Map guids to authority/publication options before calling load_data.
- Always pass the uploaded attachment through to options.
- Validate option keys at the job boundary.
When it happens
Trigger: Calling OutcomeData.load_data with an empty options hash or options holding only unrelated keys (e.g. guid only without authority/publication/archive_file).
Common situations: Scripts importing by a bare GUID without mapping it to authority/publication; callers forgetting to pass the uploaded attachment; refactor dropping the archive_file key from options.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- Missing required content_migration settings
- Artifact required for assessing
- Assessment type required for assessing
- assessor and assessee required
- Assessor required for assessing
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/b231629bab05f557.
Report an issue: GitHub.
Appendix: source
Thrown at gems/plugins/academic_benchmark/lib/academic_benchmark/outcome_data.rb:28
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
module AcademicBenchmark
module OutcomeData
def self.load_data(options = {})
if options.key?(:archive_file)
OutcomeData::FromFile.new(options.slice(:archive_file))
elsif options.key?(:authority) || options.key?(:publication)
OutcomeData::FromApi.new(options)
else
raise Canvas::Migration::Error, "No outcome file or guid given"
end
end
end
end
View on GitHub (pinned to 1c9f0bb801)