Issue #486 resolved

ImportError related to 'syncdb' occuring twice in multi-shop on startup

Anonymous created an issue

When you try to use a newly-installed multi-shop branch checkout, an !ImportError occurs, complaining about missing 'in_syncdb'. When you comment out the import statement and run it again, another !ImportError occurs about 'syncdb'. Provided a patch to workaround the problem, but maybe these modules are missing from SVN. == Steps to Reproduce == 1. Get the latest revision (currently, [1389]) of the [source:/satchmo/branches/multi-shop/satchmo multi-shop] branch. 1. Make sure you have the packages in SatchmoRequirements and they are on your PYTHONPATH, as well as the parent directory of the multi-shop checkout directory (let's call it ''site-root''). 1. Make the necessary changes to settings.py and local_settings.py, as described in SatchmoNewInstallation 1. Run: {{{ ./manage.py satchmo_check }}} from the ''site-root''. == Expected Results == The command passes and displays: {{{ Checking your satchmo configuration. Your configuration has no errors. }}} ''or'' at least some problems with the configuration. == Actual Result == Traceback because of an !ImportError about missing in_syncdb in satchmo.utils.syncdb: {{{ Traceback (most recent call last): File "./manage.py", line 11, in <module> execute_manager(settings) File "/work/lib/django/core/management/init.py", line 301, in execute_manager utility.execute() File "/work/lib/django/core/management/init.py", line 248, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/work/lib/django/core/management/init.py", line 206, in fetch_command klass = load_command_class(app_name, subcommand) File "/work/lib/django/core/management/init.py", line 53, in load_command_class {}, {}, ['Command']), 'Command')() File "/work/satchmo/shop/management/init.py", line 1, in <module> from satchmo.utils.syncdb import in_syncdb ImportError: No module named syncdb }}} == Further Information == If the line {{{from satchmo.utils.syncdb import in_syncdb}}} is commented out and {{{./manage.py satchmo_check}}} is called again, another traceback appears: {{{ Traceback (most recent call last): File "./manage.py", line 11, in <module> execute_manager(settings) File "/work/lib/django/core/management/init.py", line 301, in execute_manager utility.execute() File "/work/lib/django/core/management/init.py", line 248, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/work/lib/django/core/management/base.py", line 77, in run_from_argv self.execute(args, options.dict) File "/work/lib/django/core/management/base.py", line 86, in execute translation.activate('en-us') File "/work/lib/django/utils/translation/init.py", line 73, in activate return real_activate(language) File "/work/lib/django/utils/translation/init.py", line 43, in delayed_loader return g'real_%s' % caller File "/work/lib/django/utils/translation/trans_real.py", line 209, in activate _active[currentThread()] = translation(language) File "/work/lib/django/utils/translation/trans_real.py", line 198, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/work/lib/django/utils/translation/trans_real.py", line 181, in _fetch app = getattr(import(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:]) File "/work/satchmo/configuration/init.py", line 14, in <module> from functions import File "/work/satchmo/configuration/functions.py", line 3, in <module> from satchmo.configuration import values File "/work/satchmo/configuration/values.py", line 12, in <module> from satchmo.utils import load_module, is_string_like, is_list_or_tuple, syncdb ImportError: cannot import name syncdb }}} == Workaround == Comment out the offending code, trying to import the missing modules. The attached patch does the same job.

Reported by dimitern

Comments (1)

  1. Log in to comment