当我尝试迁移我的数据库时,我收到此错误:
Running migrations for easy_thumbnails:
- Nothing to migrate.
- Loading initial data for easy_thumbnails.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/Library/Python/2.7/site-packages/south/migration/__init__.py", line 233, in migrate_app
migrator.load_initial_data(target, db=database)
File "/Library/Python/2.7/site-packages/south/migration/migrators.py", line 222, in load_initial_data
self.post_1_6(target, db)
File "/Library/Python/2.7/site-packages/south/migration/migrators.py", line 240, in post_1_6
old_cache = django.db.models.loading.cache
AttributeError: 'module' object has no attribute 'loading'
应用版本为:
Django 1.6.2
Easy thumbnails 1.4
Mptt 0.5.5
Pymorphy 0.5.6
Python 2.7.5
Pytils 0.3dev
South 0.8.4
Suit 0.2.5
它看起来不像easy_thumbnails问题,因为当我尝试迁移我的django-allauth时会引发同样的错误。 拜托,帮助我!
答案 0 :(得分:0)
好像你的django套餐坏了。检查您的环境中是否存在python2.7 / site-packages / django / db / models / loading.py文件。或者只是重新安装django包。
pip install -U --force-reinstall django