Search code examples
pythondjangolrs

Import Error: cannot import name MultiPartParser


I'm trying to deploy the ADL_LRS 0.90. I did the following:

sudo apt-get install python
sudo apt-get install python-django
sudo apt-get install git
sudo apt-get install fabric
sudo apt-get install python-setuptools libmysqlclient-dev python-dev python-mysqldb python-libxml2 python-libxslt1 libxml2-dev libxslt1-dev
sudo apt-get install mysql-server
mysqladmin -h localhost -u root -p create lrs

Then I edited the file ADL_LRS/adl_lrs/settings.py with my USER and PASSWORD entries for my MySQL DB Then I ran the command: python manage.py createcachetable cache_statement_list in the ADL_LRS directory Then python manage.py syncdb and finally ./manage.py runserver and everything works fine but when I try to access to http://127.0.0.1:8000/admin/ I get the following error:

cannot import name MultiPartParser

This is the line:

from django.http import MultiPartParser

Someone knows what could be happening?


Solution

  • I think you should stay with the requirements.txt they provide... As both of our collegues describes about the version of django in ubuntu repository is bigger than the one used by ADL_RSL, and perhaps django update the code base.

    I suggest you follow their how to install in their github page... in there, they use pip and virtualenv to keep the project consise.

    https://github.com/adlnet/ADL_LRS

    If then you want to update their software to a bigger django version, and correct the bugs (as the one you report there) i think they will appreciate.

    thanks