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

Problem with CLDR when Installing from source #453

Closed
vgamula opened this issue Oct 21, 2016 · 1 comment
Closed

Problem with CLDR when Installing from source #453

vgamula opened this issue Oct 21, 2016 · 1 comment

Comments

@vgamula
Copy link

vgamula commented Oct 21, 2016

Hi,

I'm trying to install babel by specific commit, because functionality, which I need, is not released yet (#332 (comment)).
I set -e git+git://github.com/python-babel/babel@903898f97d1010f5bf39b6b6d7e153fc6c2cc15b#egg=Babel in requirements.txt, but, after making messages I got next error:

Traceback (most recent call last):
  File "/Users/vgamula/.pyenv/versions/turfmapp/bin/pybabel", line 9, in <module>
    load_entry_point('Babel', 'console_scripts', 'pybabel')()
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/frontend.py", line 887, in main
    return CommandLineInterface().run(sys.argv)
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/frontend.py", line 812, in run
    return cmdinst.run()
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/frontend.py", line 462, in run
    sort_by_file=self.sort_by_file)
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/pofile.py", line 468, in write_po
    for message in _sort_messages(catalog, sort_by=sort_by):
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/pofile.py", line 529, in _sort_messages
    messages = list(messages)
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/catalog.py", line 537, in __iter__
    for name, value in self.mime_headers:
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/messages/catalog.py", line 369, in _get_mime_headers
    locale='en')))
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/dates.py", line 716, in format_datetime
    locale = Locale.parse(locale)
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/core.py", line 301, in parse
    language = get_global('language_aliases').get(language, language)
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/core.py", line 73, in get_global
    _raise_no_data_error()
  File "/Users/vgamula/.pyenv/versions/turfmapp/src/babel/babel/core.py", line 27, in _raise_no_data_error
    raise RuntimeError('The babel data files are not available. '
RuntimeError: The babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files.  Just make sure to run "python setup.py import_cldr" before installing the library.

So, how can I prepare my cldr data when installing babel by specific commit?

@akx
Copy link
Member

akx commented Oct 21, 2016

Unfortunately direct git installation is not really supported.

You may want to check out that revision, run python setup.py import_cldr bdist_wheel and use the built wheel as a dependency in your project.

Let me know if you need help!

@akx akx closed this as completed Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants