Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Satchmo clonesatchmo.py ImportError: cannot import name execute_manager

I get satchmo to try, but I have a great problem at first try, and I don't understand whats wrong. When I making $ python clonesatchmo.py into clear django project, it trows an error:

$ python clonesatchmo.py
Creating the Satchmo Application
Customizing the files
Performing initial data synching
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    from django.core.management import execute_manager
ImportError: cannot import name execute_manager
Traceback (most recent call last):
File "manage.py", line 18, in <module>
  from django.core.management import execute_manager
ImportError: cannot import name execute_manager
Error: Can not copy the static files.
Error: Can not syncdb.

AND creates a store folder. trying smth like this is working!!:

$ python manage.py shell
>>> import os, sys
>>> print sys.executable
/some/path/to/python
>>> os.system('bash')
$ /some/path/to/python manage.py validate
# this is NOT fail on "from django.core.management import execute_manager"

I have Django 1.6 and Satchmo 0.9.3, python 2.7.5 (I do not use virtualenv)

like image 776
Pruntoff Avatar asked Aug 04 '13 22:08

Pruntoff


1 Answers

Replace the contents of manage.py with the following (from a new django 1.6 project).

#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<app>.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
like image 137
scum Avatar answered Nov 03 '22 11:11

scum