django/python how come the module that ran this code isn't listed in the traceback? -


sometimes, maybe 30-40% of time when traceback, actual file read code isn't listed, why be?

take traceback example..

traceback (most recent call last):   file "manage.py", line 10, in <module>     execute_from_command_line(sys.argv)   file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line     utility.execute()   file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute     django.setup()   file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup     apps.populate(settings.installed_apps)   file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate     app_config = appconfig.create(entry)   file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/apps/config.py", line 86, in create     module = import_module(entry)   file "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module     __import__(name) importerror: no module named captcha 

i deduced after minute of thinking must settings.py, doesn't anywhere in trace. why?

the code you've shown using lot of generics try import module , generic code nature has no business in knowing module name is.

in other examples may find, because you've gone down rabbit hole. place actual error is far away own code stack trace showing many steps past own line of code.

i deduced after minute of thinking must settings.py, doesn't anywhere in trace. why?

it give hint @ this

file "/home/jeff/django/langalang/venv/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup     apps.populate(settings.installed_apps) 

it mentions trying create installed_apps half way trace


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -