wichert / lingua

Translation toolkit for Python
Other
46 stars 32 forks source link

pot-create cannot work with babel in python 3.4 #28

Closed williamwu0220 closed 10 years ago

williamwu0220 commented 10 years ago
$ pot-create -c lingua.cfg i18n
Traceback (most recent call last):
  File "/home/william/venv/pyramid-1.5/bin/pot-create", line 9, in <module>
    load_entry_point('lingua==2.1', 'console_scripts', 'pot-create')()
  File "/home/william/venv/pyramid-1.5/lib/python3.4/site-packages/lingua/extract.py", line 232, in main
    for message in extractor(real_filename, options):
  File "/home/william/venv/pyramid-1.5/lib/python3.4/site-packages/lingua/extractors/babel.py", line 23, in wrapper
    for (lineno, _, msgid, comment) in extractor(fileobj, DEFAULT_KEYWORDS.keys(), (), None):
  File "/home/william/venv/pyramid-1.5/lib/python3.4/site-packages/jinja2/ext.py", line 582, in babel_extract
    for extension in options.get('extensions', '').split(','):
AttributeError: 'NoneType' object has no attribute 'get'

My env:

lingua.cfg:

[extension:.jinja2]
plugin = babel-jinja2