#23897: makemessages does not work if STATIC_ROOT isn't defined
--------------------------------------+--------------------
     Reporter:  igorcc                |      Owner:  nobody
         Type:  Bug                   |     Status:  new
    Component:  Internationalization  |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 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'''

--
Ticket URL: <https://code.djangoproject.com/ticket/23897>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.603d03d630dec4cd7903a6288386b94e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to