Hi,
Thanks for the feedback. I tried Hynek's method, but it didn't help.
The only module that wasn't loaded was '
tax.modules.no' but the
provided code snipped didn't help from what I could see.
What seems to have fixed it for now at least was the following
modification to satchmo/apps/payment/models.py:
1. Comment out "from satchmo_store.shop.models import OrderPayment"
from imports at top of the file (line 15).
2. Do lazy loading of OrderPayment on line 46:
orderpayment = models.ForeignKey('OrderPayment', unique=True,
related_name="creditcards")
Other comments:
1) In my satchmo.log file I see the following:
SettingNotSet: SHIPPING.MODULES
SettingNotSet: PAYMENT_PAYPAL.CREDITCHOICES
Not entirely sure what they refer to or if they are related in any
way.
2) I never see the error when running runserver on my local machine.
3) On my local machine running Apache through WSGI, when I run the
WSGI script (./django.wsgi) I don't get the import error
4) However, on my deployment server (shared hosting) when I run my
WSGI script (./django.wsgi) I get the import error every time (without
my above-mentioned 'fix')
I do not know what the difference is between my local machine (running
Apache) and my shared hosting service that causes the difference in
results. It's the same code, and I've tried to replicate the version
of every library that I know I use and use the same version of
Python.
I'm not really an experienced Python developer so this is all I know
for now. Anyway, it seems to be the cause of a very specific issue of
my deployment configuration, but I don't know what. And, at least the
above-mentioned fix has solved it for me for now.
Again, thanks for your help,
Jakob
On Jan 13, 12:43 pm, John-Scott Atlakson
<
john.scott.atlak...@gmail.com> wrote:
> Hi Jakob,
>
> This rearranging of imports solved a (separate?) issue I was seeing where
> OrderTaxDetail could not be imported. This had the mysterious effect of
> eliminating the large number of OrderPayment import errors, even errors I
> was seeing in sites using an unmodified Satchmo in a separate virtualenv.
>
> I think Chris M was suggesting that you try Hynek's strategy mentioned
> above.
>
> One simple thing would be to comment out admin.autodiscover() and see if the
> problem goes away. That doesn't tell us much, but if this is a live site
> that you need to get back up in a rush, this may be a stop gap.
>
> I may have to take part of this conversation over to the modwsgi group, but
> there is definitely something specific about Satchmo and/or some of its
> depencies (keyed-cache, threaded-multihost, etc) since I do not have this
> problem with any other non-Satchmo projects (even on the same server using
> the same virtualenv, just no satchmo in INSTALLED_APPS).
>
> Cheers,
> John-Scott
>