learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
458 stars 305 forks source link

kalite manage setup gives "Unknown command: migrate" #3887

Closed benjaoming closed 9 years ago

benjaoming commented 9 years ago

Branch: develop (but also tested after the settings refactor)

I just tried upgrading an older installation fra an early 0.14 develop branch.

It was running directly from a git checkout.

Traceback:

  _   __  ___    _     _ _        
 | | / / / _ \  | |   (_) |       
 | |/ / / /_\ \ | |    _| |_ ___  
 |    \ |  _  | | |   | | __/ _ \ 
 | |\  \| | | | | |___| | ||  __/ 
 \_| \_/\_| |_/ \_____/_|\__\___| 

http://kalite.learningequality.org

         version 0.14.dev11

WARNING:root:It's recommended that you install Python version 2.7.9. Your version is: sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)

--------------------------------------------------------------------------------
This script will configure the database and prepare it for use.
--------------------------------------------------------------------------------
Press [enter] to continue...
-------------------------------------------------------------------
WARNING: Database file already exists!
-------------------------------------------------------------------
Keep database file and upgrade to KA Lite version 0.14.dev11? (yes or no) yes
Upgrading database to KA Lite version 0.14.dev11
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Traceback (most recent call last):
  File "/media/FAIR/data/ka-lite/python-packages/django/core/management/base.py", line 224, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/media/FAIR/data/ka-lite/python-packages/django/core/management/base.py", line 263, in execute
    output = self.handle(*args, **options)
  File "/media/FAIR/data/ka-lite/kalite/distributed/management/commands/setup.py", line 284, in handle
    call_command("migrate", merge=True, verbosity=options.get("verbosity"))
  File "/media/FAIR/data/ka-lite/python-packages/django/core/management/__init__.py", line 141, in call_command
    raise CommandError("Unknown command: %r" % name)
CommandError: Unknown command: 'migrate'

But I can import south!

root@fair-server:/media/FAIR/data/ka-lite# bin/kalite shell
Python 2.7.6 (default, Mar 22 2014, 22:59:38) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import south
>>> 
MCGallaspy commented 9 years ago

Could it be there's a "ghost" package in python-packages?

benjaoming commented 9 years ago

Good point! Let me just try cleaning the pyc's!

benjaoming commented 9 years ago

Bingo!

benjaoming commented 9 years ago
find . -name '*pyc' -exec rm {} \;