renzon / tekton

A full stack project based on tekton, gaegraph, gaeforms and gaepermission
MIT License
34 stars 48 forks source link

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

Open renzon opened 9 years ago

renzon commented 9 years ago

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 commented 9 years ago

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