Opened 10 years ago

Last modified 10 years ago

#23897 closed Bug

makemessages does not work if STATIC_ROOT isn't defined — at Initial Version

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

After new project is created, I have put into settings.py:

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

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

Traceback (most recent call last):

File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py", line 41, in <module>

run_module(manage_file, None, 'main', True)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 176, in run_module

fname, loader, pkg_name)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", 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/runpy.py", line 72, in _run_code

exec code in run_globals

File "/Users/igo/PycharmProjects/TestTest/manage.py", line 10, in <module>

execute_from_command_line(sys.argv)

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line

utility.execute()

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/init.py", line 377, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv

self.execute(*args, options.dict)

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute

output = self.handle(*args, options)

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/base.py", line 533, in handle

return self.handle_noargs(options)

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 283, in handle_noargs

potfiles = self.build_potfiles()

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 299, in build_potfiles

file_list = self.find_files(".")

File "/Users/igo/Django/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", 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/posixpath.py", line 327, in normpath

initial_slashes = path.startswith('/')

AttributeError: 'NoneType' object has no attribute 'startswith

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top