I'm using Pyramid on Python 3.3 and I get an error when running 
extract_messages.
I edited my setup.cfg file just as said 
in 
http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/i18n.html#translation-domains.

Here is my setup.py
...
setup(
...
    install_requires=[
        # -*- Extra requirements: -*-
        'Babel',
        'lingua',
    ],
    message_extractors={'.': [
        ('**.py', 'lingua_python', None),
        ('**.pt', 'lingua_xml', None),
    ]},

)

When I run python setup.py extract_messages I get the following error:
Traceback (most recent call last):
  File "setup.py", line 31, in <module>
    """,
  File "/usr/lib/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.3/distutils/dist.py", line 930, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.3/distutils/dist.py", line 949, in run_command
    cmd_obj.run()
  File 
"/home/winston/projects/Python-3.3.4/lib/python3.3/site-packages/Babel-1.3-py3.3.egg/babel/messages/frontend.py",
 
line 305, in run
    for filename, lineno, message, comments, context in extracted:
  File 
"/home/winston/projects/Python-3.3.4/lib/python3.3/site-packages/Babel-1.3-py3.3.egg/babel/messages/extract.py",
 
line 163, in extract_from_dir
    strip_comment_tags):
  File 
"/home/winston/projects/Python-3.3.4/lib/python3.3/site-packages/Babel-1.3-py3.3.egg/babel/messages/extract.py",
 
line 190, in extract_from_file
    strip_comment_tags))
  File 
"/home/winston/projects/Python-3.3.4/lib/python3.3/site-packages/Babel-1.3-py3.3.egg/babel/messages/extract.py",
 
line 265, in extract
    options=options or {})
  File 
"/home/winston/projects/Python-3.3.4/lib/python3.3/site-packages/lingua-1.6-py3.3.egg/lingua/extractors/python.py",
 
line 24, in __call__
  File "/home/winston/projects/Python-3.3.4/lib/python3.3/tokenize.py", 
line 527, in _tokenize
    if line[pos] in '#\r\n':           # skip comments or blank lines
TypeError: 'in <string>' requires string as left operand, not int


If I remove the message_extractors param, the command runs fine but doesn't 
extract messages from *.pt files.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to