1
votes

I am working on a django app and was using south for migrations. Everything worked well in my system and I was able to migrate. But when I put the code in the server and ran syncdb, I got the error as:

#After a long traceback
from django.db.models.loading import cache
Import Error: no module named cache

Then I removed south from the installed_apps and tried syncdb, which worked perfectly. But import south works fine in shell. So I am sure that south is installed in my server. Why do I get this error?

edit: The same error occured in some other systems too. I install south using pip install south

1
Ignoring the weird error for a moment, remember that south keeps data about the migrations as part of the db and creates a folder called migration to keep track of those migrations. So when moving to a server and opening a fresh db (as I'm guessing you are doing because syncdb), you have to remove that folder to avoid ghost migrations. Have you done that? - yuvi
What version of Django are you using? django.db.models.loading was more than likely removed/changed when the app-loading refactor landed on master (1.7dev). - Mark Lavin
@yuvi: I did not remove it.. I get what the error is - Aswin Murugesh
So upon removing it and trying to redo syncdb - what happens? - yuvi
@yuvi But then the error still continues.. - Aswin Murugesh

1 Answers

2
votes

In the comments you mention you are using Django 1.7.

I wouldn't imagine South to support that version, as South-like migration support (by the South author, no less) lands in 1.7: https://docs.djangoproject.com/en/dev/topics/migrations/