Bug 1094797

Summary: [abrt] python3-django: __init__.py:47:_setup:django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() ...
Product: [Fedora] Fedora Reporter: hlx98007
Component: python-djangoAssignee: Matthias Runge <mrunge>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: bkabrda, jdornak, mhroncok, michel, mrunge
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/d500824fc842a1edcec84d2b66ed7c8b584e3b64
Whiteboard: abrt_hash:5b22a9ff998a701874faf1a2ccd67fce579b12ad
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-06 18:37:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description hlx98007 2014-05-06 13:53:42 UTC
Description of problem:
python3-django-admin startapp mysite
cd mysite
python3-django-admin runserver

booom.

Version-Release number of selected component:
python3-django-1.6.3-1.fc20

Additional info:
reporter:       libreport-2.2.2
cmdline:        /usr/bin/python3 /usr/bin/python3-django-admin runserver
executable:     /usr/bin/python3-django-admin
kernel:         3.14.2-200.fc20.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
__init__.py:47:_setup:django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Traceback (most recent call last):
  File "/usr/lib64/python3.3/os.py", line 673, in __getitem__
    value = self._data[self.encodekey(key)]
KeyError: b'DJANGO_SETTINGS_MODULE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/django/conf/__init__.py", line 38, in _setup
    settings_module = os.environ[ENVIRONMENT_VARIABLE]
  File "/usr/lib64/python3.3/os.py", line 676, in __getitem__
    raise KeyError(key)
KeyError: 'DJANGO_SETTINGS_MODULE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/python3-django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python3.3/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.3/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3.3/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python3.3/site-packages/django/core/management/base.py", line 279, in execute
    saved_locale = translation.get_language()
  File "/usr/lib/python3.3/site-packages/django/utils/translation/__init__.py", line 154, in get_language
    return _trans.get_language()
  File "/usr/lib/python3.3/site-packages/django/utils/translation/__init__.py", line 52, in __getattr__
    if settings.USE_I18N:
  File "/usr/lib/python3.3/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/usr/lib/python3.3/site-packages/django/conf/__init__.py", line 47, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Local variables in innermost frame:
desc: 'setting USE_I18N'
name: 'USE_I18N'
self: <django.conf.LazySettings object at 0x7fd315a2b550>

Comment 1 hlx98007 2014-05-06 13:53:46 UTC
Created attachment 892886 [details]
File: backtrace

Comment 2 hlx98007 2014-05-06 13:53:51 UTC
Created attachment 892887 [details]
File: environ

Comment 3 Matthias Runge 2014-05-06 18:37:40 UTC

*** This bug has been marked as a duplicate of bug 1094793 ***