Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23897 closed Bug (duplicate)

makemessages does not work if STATIC_ROOT isn't defined

Reported by: Igor Koshkarov Owned by: nobody
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Claude Paroz)

After new project is created, I have put into

    os.path.join(BASE_DIR, 'locale'),
    ('ru', 'Russian'),
    ('en', 'English'),

I have created directory 'locale' under BASE_PATH as well.
And after I ran ./ makemessages -l ru I got:

Traceback (most recent call last):
  File "/Applications/", line 41, in <module>
    run_module(manage_file, None, '__main__', True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 176, in run_module
    fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/Users/igo/PycharmProjects/TestTest/", line 10, in <module>
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/", line 385, in execute_from_command_line
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/", line 377, in execute
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/", line 338, in execute
    output = self.handle(*args, **options)
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/", line 533, in handle
    return self.handle_noargs(**options)
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/", line 283, in handle_noargs
    potfiles = self.build_potfiles()
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/", line 299, in build_potfiles
    file_list = self.find_files(".")
  File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/", line 358, in find_files
    ignored_roots = [os.path.normpath(p) for p in (settings.MEDIA_ROOT, settings.STATIC_ROOT)]
  File "/Users/igo/Django/lib/python2.7/", line 327, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

Change History (3)

comment:1 by Roman, 10 years ago

Is this duplicate of #23717 ?

comment:2 by Claude Paroz, 10 years ago

Resolution: duplicate
Status: newclosed

Yes, it is.

comment:3 by Claude Paroz, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top