WebFaction
Community site: login faq

I've followed the instructions for installing Satchmo through both the Satchmo tutorial and the advice within Wedfaction's old forum. Except for using python2.7. I was thinking I may have a pythonpath error... but after some work I realize I've got pythonpath working perfectly... I can run python and import every individual module by hand fine. But python manage.py satchmo_check bring up these messages.


Checking your satchmo configuration.
Using Django version 1.3
Using Satchmo version 0.9.2-pre hg-unknown

The following errors were found:
Tiny RML2PDF is not installed.
Registration is not installed.
YAML is not installed.
App plugins should be upgraded to version 0.1.2 or newer.
Livesettings should be upgraded to version 1.4-8 or newer.
Threaded multihost is not installed.
Keyedcache should be upgraded to version 1.4-4 or newer.
Unable to resolve urls. Received error - ValueError: Empty module name

I can verify that all of these are installed and the latest. That and I can import them by hand. Any advice?

-Daniel C.


EDIT:::

Also, if it helps any, when I try

python2.7 manage.py satchmo_copy_static

I get

Error: No module named simple.localsite


EDIT:::

python2.7 satchmo/scripts/clonesatchmo.py

Creating the Satchmo Application
Customizing the files Performing
initial data synching Traceback (most
recent call last):   File "manage.py",
line 18, in ?
    from django.core.management import execute_manager ImportError: No module
named django.core.management Traceback
(most recent call last):   File
"manage.py", line 18, in ?
    from django.core.management import execute_manager ImportError: No module
named django.core.management Store
setup had the following setup errors:
- Can not copy the static files.
- Can not syncdb.

This does make a copy of the store in sub-folder... but I think the error messages are what's important. Oh and I can import all of these by hand... so that works too.

asked 04 May '11, 12:23

JBlack
1125
accept rate: 0%

edited 04 May '11, 14:04

Can you try explictly specifying the path using http://docs.webfaction.com/software/python.html?highlight=pythonpath#adding-to-pythonpath-from-the-command-line

Also can you try

import django
import satchmo_store
satchmo_store.get_version()

and paste the output here?

(04 May '11, 23:37) neeravk
python
Python 2.7.1 (r271:86832, Dec  1 2010, 06:29:57) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> import satchmo
>>> satchmo_store.get_version()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'satchmo_store' is not defined
>>> django.VERSION
(1, 3, 0, 'final', 0)
>>> satchmo_store.VERSION
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'satchmo_store' is not defined
(06 May '11, 09:18) JBlack

Please try running "import satchmo_store" before "satchmo_store.get_version()"

(06 May '11, 09:32) tie
>>> satchmo_store.get_version()
'0.9.2-pre hg-unknown'
(06 May '11, 09:46) JBlack

It's hard to say what is wrong without looking more at your application. If you open a support ticket we will take a look and help you find the problem.

(06 May '11, 12:45) aaronh ♦♦

Anyone else who has these errors to ignore them. My advice is put all libraries in a subfolder... build each package yourself on the server. Set the path in apache. Put the following code in your project directories __init__.py file to fix any path issues.

import os
import sys
import string

myincludes = ("satchmo","livesettings","pycrypto","crypto","pyyaml","registration", \
              "caching-app-plugins","keyedcache,signals-ahoy","threaded-multihost", \
              "jinja","elementtree","pygments","sorl","south","sphinx", "trml2pdf",
              "apps","projects","yaml","signals_ahoy","app_plugins") # lowercase all... when test check lower cases

myhome = "/home/myuser"

myrootdir = []
myrootdir.append(myhome + os.sep + "lib/python2.7") # can be in your webapps/django/lib/python2.7
myrootdir.append(myhome + os.sep + "webapps/django/myproject/src") # the subfolder you put your libraries in

for w in myrootdir:
    for x in os.walk(w):
        for y in myincludes:
            if x[0].split(os.sep)[-1][-len(".egg"):] == ".egg" \
                                or y in string.lower(x[0].split(os.sep)[-1][-len(y):]) \
                                and ".hg" not in x[0].split(os.sep) \
                                and "templates" not in x[0].split(os.sep):
                if x[0] not in sys.path:
                    sys.path.append(x[0])

for x in myrootdir:
    if x not in sys.path:
        sys.path.append(x)

This will help fix your path issues. The rest of the answers to problems seem to be scattered over the net. I will leave other problems for other sections. It took a lot for me to get this working.

As an example my src subfolder in my project directory looks like this:

app_plugins  l10n          satchmo_ext       sorl                trml2pdf
Crypto       livesettings  satchmo_skeleton  south               yaml
docs         payment       satchmo_store     sphinx
docutils     product       satchmo_utils     static
__init__.py  registration  shipping          tax
keyedcache   satchmo       signals_ahoy      threaded_multihost

My __init__.py file, in this src folder, is blank.

touch __init__.py

One last thing you need to know. Is when you build the libraries use python setup.py build which will make a local build directory. You'll have to move 'mv' each build into the root src folder. This is tedious and takes time. NOTE with the init script I gave you you may not even need to build any libraries (just point the script to your existing libraries)... but I'd still advise you do.

permanent link

answered 09 May '11, 21:14

JBlack
1125
accept rate: 0%

edited 10 May '11, 00:24

What's important is the 'python manage.py runserver' brings up 0 errors. This is only for testing purposes.

(09 May '11, 21:18) JBlack

Thanks for sharing your detailed solution!

(09 May '11, 21:21) ryans ♦♦

Try building it from the 9.1 stable and not directly checking out trunk like their docs explain. We have attempted building the same stack on a test account and have the same error, there is no rational reason for this other than it might be broken in trunk(which has happened to me personally a number of times with satchmo, I do not even trust trunk on ANY Django project because satchmo and pinax always mess this up)

permanent link

answered 06 May '11, 18:30

johns
5.4k412
accept rate: 23%

Alright.

wget https://bitbucket.org/chris1610/satchmo/get/v0.9.1.tar.gz
gunzip v0.9.1.tar.gz
tar -xf v0.9.1.tar
cd chris1610-satchmo-86134417a87b/
python2.7 setup.py install

I also went and copied the satchmo folder from here to my ~/lib/python2.7/

I ended up having a problem with

python manage.py satchmo_check
Error: No module named simple.localsite
So I added
PYTHONPATH=$PYTHONPATH:$HOME/lib/python2.7/satchmo/projects/
export PYTHONPATH
clonesatchmo.py doesn't find the path to the skeleton so I copy that over manually. Then I get this
python manage.py satchmo_check
Checking your satchmo configuration.
Using Django version 1.3
Using Satchmo version 0.9-1 hg-unknown
The following errors were found:
Unable to resolve url. Received error- Empty module name
And this is just ugly when I do a test. I can't even fit all the errors here. So I'll put snippets.
python manage.py test
...
File "/home/user/webapps/django/lib/python2.7/django/db/backends/sqlite3/base.py", line 234, in execute
    return Database.Cursor.execute(self, query, params)
DatabaseError: no such table: livesettings_setting
...
File "/home/user/webapps/django/lib/python2.7/django_livesettings-1.4_7-py2.7.egg/livesettings/values.py", line 312, in _value
    raise SettingNotSet("Startup error, couldn't load %s.%s" %(self.group.key, self.key))
livesettings.models.SettingNotSet: ("Startup error, couldn't load PAYMENT_DUMMY.URL_BASE", None)

(07 May '11, 22:47) JBlack

Also when I goto make sure livesettings is installed properly this is my output.

easy_install django-livesettings

...

Installed /tmp/easy_install-H7l5ou/django-livesettings-1.4-7/setuptools_hg-0.2-py2.4.egg /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/util.py:17: RuntimeWarning: Python C API version mismatch for module osutil: This Python has API version 1012, module osutil has version 1013. import error, osutil, encoding /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/patch.py:14: RuntimeWarning: Python C API version mismatch for module base85: This Python has API version 1012, module base85 has version 1013. import base85, mdiff, util, diffhelpers, copies, encoding /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/mdiff.py:9: RuntimeWarning: Python C API version mismatch for module bdiff: This Python has API version 1012, module bdiff has version 1013. import bdiff, mpatch, util /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/mdiff.py:9: RuntimeWarning: Python C API version mismatch for module mpatch: This Python has API version 1012, module mpatch has version 1013. import bdiff, mpatch, util /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/patch.py:14: RuntimeWarning: Python C API version mismatch for module diffhelpers: This Python has API version 1012, module diffhelpers has version 1013. import base85, mdiff, util, diffhelpers, copies, encoding /home/user/lib/python2.7/mercurial-1.8.3-py2.7-linux-i686.egg/mercurial/revlog.py:17: RuntimeWarning: Python C API version mismatch for module parsers: This Python has API version 1012, module parsers has version 1013. import changegroup, ancestor, mdiff, parsers, error, util zip_safe flag not set; analyzing archive contents... tests.manage: module references file tests.settings: module references file Adding django-livesettings 1.4-7 to easy-install.pth file

...

(07 May '11, 22:56) JBlack

My PYTHONPATH is empty every time I login. Isn't the site.py in my lib folder supposed to auto-generate this?

(07 May '11, 23:40) JBlack

No, PYTHONPATH is a shell environment variable it can only be set by .bash_profile or if you set it yourself on the terminal.

All the errors seem related to the path but in-spite of having them in the path they are not found which could indicate path manipulation in the scripts or just incompatibility with Python 2.7

Either way you shuld it file it as an issue here: https://bitbucket.org/chris1610/satchmo/issues/new

(08 May '11, 00:06) neeravk
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×52
×21
×7
×3
×1

question asked: 04 May '11, 12:23

question was seen: 7,202 times

last updated: 10 May '11, 00:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM