Administrators of a Canvas LMS installation may encounter a QTI migration error when importing course content, or performing any actions that triggers the QTI migration scripts. This happens because the environment is missing a few essential libraries. This post documents the steps to resolve this in an Ubuntu 14.04 LTS environment.
Note that you require Python to be installed, preferably version 2.5 or newer (but not 3 or newer). You can query the version of python installed as follows
python --version Python 2.7.6
Step 1: Login to the server via SSH and navigate to vendor folder located within the Canvas LMS source directory. If you followed Instructure’s production start guide to a T, it will be at /var/canvas/vendor
Step 2: Clone the QTI Migration github repository and update the python script’s permissions
cd /var/canvas/vendor git clone https://github.com/instructure/QTIMigrationTool.git QTIMigrationTool cd QTIMigrationTool && chmod +x migrate.py
Step 3: Install the lxml python library. I installed this using the Ubuntu package manager. You can also use the Python Package Index (PIP) to install the lxml package.
apt-get install python-lxml
Step 4: Restart delayed jobs
/etc/init.d/canvas_init restart Stopping pool 16907... Daemonizing...
You can now go back and re-attempt the course imports. If everything took effect as expected, they wouldn’t be any errors.
Error: Couldn’t convert QTI 1.2 to 2.1, see error log: /tmp/ …