Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n erro because Babel tries to extract files from libs on venv #37

Open
renzon opened this issue Apr 27, 2015 · 1 comment
Open

I18n erro because Babel tries to extract files from libs on venv #37

renzon opened this issue Apr 27, 2015 · 1 comment
Labels

Comments

@renzon
Copy link
Owner

renzon commented Apr 27, 2015

Strack trace:

extracting messages from ../../venv/lib/python2.7/site-packages/setuptools/tests/script-with-bom.py
Traceback (most recent call last):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/bin/pybabel", line 9, in
load_entry_point('Babel==1.3', 'console_scripts', 'pybabel')()
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1151, in main
return CommandLineInterface().run(sys.argv)
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 665, in run
return getattr(self, cmdname)(args[1:])
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 919, in extract
for filename, lineno, message, comments, context in extracted:
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/extract.py", line 163, in extract_from_dir
strip_comment_tags):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/extract.py", line 190, in extract_from_file
strip_comment_tags))
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/extract.py", line 267, in extract
for lineno, funcname, messages, comments in results:
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/extract.py", line 351, in extract_python
encoding = parse_encoding(fileobj) or options.get('encoding', 'iso-8859-1')
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/util.py", line 81, in parse_encoding
"python refuses to compile code with both a UTF8 "
SyntaxError: python refuses to compile code with both a UTF8 byte-order-mark and a magic encoding comment
pybabel update -l en_US -d ./locale -i ./locale/messages.pot
Traceback (most recent call last):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/bin/pybabel", line 9, in
load_entry_point('Babel==1.3', 'console_scripts', 'pybabel')()
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1151, in main
return CommandLineInterface().run(sys.argv)
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 665, in run
return getattr(self, cmdname)(args[1:])
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1097, in update
infile = open(options.input_file, 'U')
IOError: [Errno 2] No such file or directory: './locale/messages.pot'
pybabel init -l en_US -d ./locale -i ./locale/messages.pot
Traceback (most recent call last):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/bin/pybabel", line 9, in
load_entry_point('Babel==1.3', 'console_scripts', 'pybabel')()
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1151, in main
return CommandLineInterface().run(sys.argv)
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 665, in run
return getattr(self, cmdname)(args[1:])
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1006, in init
infile = open(options.input_file, 'r')
IOError: [Errno 2] No such file or directory: './locale/messages.pot'
pybabel update -l pt_BR -d ./locale -i ./locale/messages.pot
Traceback (most recent call last):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/bin/pybabel", line 9, in
load_entry_point('Babel==1.3', 'console_scripts', 'pybabel')()
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1151, in main
return CommandLineInterface().run(sys.argv)
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 665, in run
return getattr(self, cmdname)(args[1:])
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1097, in update
infile = open(options.input_file, 'U')
IOError: [Errno 2] No such file or directory: './locale/messages.pot'
pybabel init -l pt_BR -d ./locale -i ./locale/messages.pot
Traceback (most recent call last):
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/bin/pybabel", line 9, in
load_entry_point('Babel==1.3', 'console_scripts', 'pybabel')()
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1151, in main
return CommandLineInterface().run(sys.argv)
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 665, in run
return getattr(self, cmdname)(args[1:])
File "/Users/renzo/PycharmProjects/ecommerce/backend/venv/lib/python2.7/site-packages/babel/messages/frontend.py", line 1006, in init
infile = open(options.input_file, 'r')
IOError: [Errno 2] No such file or directory: './locale/messages.pot'
pybabel compile -f -i ./locale/en_US/LC_MESSAGES/messages.po -o ../../appengine/locale/en_US/LC_MESSAGES/messages.mo
pybabel compile -f -i ./locale/en_US/LC_MESSAGES/messages.po -o ../../appengine/locale/en_US/LC_MESSAGES/messages.mo
compiling catalog './locale/en_US/LC_MESSAGES/messages.po' to '../../appengine/locale/en_US/LC_MESSAGES/messages.mo'
pybabel compile -f -i ./locale/pt_BR/LC_MESSAGES/messages.po -o ../../appengine/locale/pt_BR/LC_MESSAGES/messages.mo
pybabel compile -f -i ./locale/pt_BR/LC_MESSAGES/messages.po -o ../../appengine/locale/pt_BR/LC_MESSAGES/messages.mo
compiling catalog './locale/pt_BR/LC_MESSAGES/messages.po' to '../../appengine/locale/pt_BR/LC_MESSAGES/messages.mo'

@renzon renzon added the bug label Apr 27, 2015
@renzon
Copy link
Owner Author

renzon commented Apr 27, 2015

Workaround: just delete setuptools from site-packages before compiling i18n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant