satchmo_check command not found

Issue #1487 resolved
Daniel Luo created an issue

I'm stuck on step 1 of test and install the data here:

When I try to run the command, I get the following error:

(pyweb27)user@mint ~/Documents/workspace/python/site $ python satchmo_check
Unknown command: 'satchmo_check'
Type ' help' for usage.

I do have satchmo installed:

(pyweb27)user@mint ~/Documents/workspace/python/site $ python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django; import satchmo_store;
>>> satchmo_store.get_version()
'0.9.3-pre hg-2553:76b7dccafc76'

What's going on here?

Comments (11)

  1. Kevin Harvey

    Do you have all of Satchmo's apps in your INSTALLED_APPS? Are you running one of the sample projects or starting your own?

  2. Daniel Luo reporter

    I noticed that this happened after I changed my directory structure to match that of the sample project and now my is no longer being detected. How do I resolve this?

    Edit: Just saw your comment, yes it is there.

  3. Kevin Harvey

    Is in ~/Documents/workspace/python/site (along with Would help to see yoru directory structure, and any output from trying to start the Django dev server.

  4. Daniel Luo reporter

    Sure, it's here:

    I followed the structure in /virtenv/src/satchmo/satchmo. Also, is there a place where I can ask general questions? I'm having trouble finding the actual templates, models, and views for the simple store sample. I want to find out how to call the variables for the data from the database and haven't seen it in the documentation either (or maybe I'm looking in the wrong section?)

  5. Daniel Luo reporter

    I've tried moving around to the same folder as, and adding an to the current location in the above screenshot, but it's still the same issue.

    The error is ImportError: Could not import settings 'site.settings' (Is it on sys.path?): No module named site.settings

  6. Kevin Harvey

    That ImportError does not mean your is in the wrong place. It means somewhere in your code you're trying to do "from site import settings" or something like that, and that import is not working. If you're trying to access values in, use "from django.conf import settings".

  7. Daniel Luo reporter

    So I think I see that the wrong value is being passed starting from this line: settings_module = os.environ[ENVIRONMENT_VARIABLE] in class LazySettings(LazyObject). Outside of the class, we have this declaration: ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE". However, in, I have os.environ.setdefault("DJANGO_SETTINGS_MODULE", ""). In the debugger, the value of DJANGO_SETTINGS_MODULE is set to site.settings (without the projects) and changing it to include projects seems to fix the issue.

    Edit: It's also set in and as per the example, but it's the same value and I have no idea why it removes the project part.

  8. Daniel Luo reporter

    Well, that's interesting. I made a new project and copied over everything as is and I no longer have that issue.

  9. Log in to comment