It's interesting you mention this. I noticed something with OrderPayment recently too. I thought it was just the way I was generating the documents but maybe there is something going on here.
I'm wondering if there was a regression introduced recently. One issue might be trying to roll back a ways and see if the error still occurs. -Chris On Thu, Jan 6, 2011 at 10:32 AM, John-Scott <[email protected]>wrote: > I recently migrated 6 sites to a new host (running > nginx/apache-mpm-worker/modwsgi 3.3 daemon-mode on Ubuntu 10.4 LTS). They > all share the same project directory and virtualenv but each have their own > settings file and wsgi config. Only 3 are running satc...@fed2d6d6d239, > but aside from Satchmo and its dependencies, all other apps are identical > across the sites. The old vm was essentially the same, just Ubuntu 9.10 with > a Satchmo checkout from October. > > The issue is that I'm getting very random errors, "ImportError: cannot > import name OrderPayment" (see sanitized stack trace [1]). > > This error is extremely random (if I had to guess, 1 in 50-100 requests per > site) and I cannot consistently reproduce it (only once have I even > triggered one of these errors in all my prodding). > > The summary of what's going on in the traceback: > > - admin.autodiscover() is in the middle of importing the models from > satchmo_store.shops.models. > - While parsing OrderBasePayment, it then needs to lookup a custom > field in payment.fields. > - PaymentChoiceField's choices set off a chain of method calls that > results in models.get_apps() being called. > - models.get_apps() of course starts the model import process over. > - While models.get_apps() imports payment.models, it attempts to import > OrderPayment from satchmo_store.shops, which fails for reasons not clear to > me. > > > Any ideas of what could be causing this random error? Or tips on how to > troubleshoot this more effectively? > > It seems if this was purely an import error, it would always be an error > and not just *sometimes*. At this point it does seem to be some odd > combination of Satchmo (or one of its dependencies) and the particulars of > my environment since the 3 non-Satchmo sites are working flawlessly. Any > keyedcache or threadlocal wonkiness that might be wreaking havoc? > > Thanks, > John-Scott > > [1] http://dpaste.com/hold/293523/ > > -- > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<satchmo-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
