Odd error in create_config_info.py

5 views
Skip to first unread message

David Collins

unread,
Jun 6, 2016, 9:46:53 AM6/6/16
to enzo...@googlegroups.com

Hi, Everybody!

Has anyone seen this error in create_config_info?  For whatever reason, local = "" in this instance, and it chokes.  Mercurial seems to be functioning fine in general, but it has issues getting imported.

Thanks!
d.

Traceback (most recent call last):
  File "create_config_info.py", line 62, in <module>
    changeset, branch, diff = get_hg_info()
  File "create_config_info.py", line 19, in get_hg_info
    from mercurial import hg, ui, commands 
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/site-packages/mercurial/hg.py", line 13, in <module>
    import localrepo, bundlerepo, unionrepo, httppeer, sshpeer, statichttprepo
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/site-packages/mercurial/localrepo.py", line 10, in <module>
    import peer, changegroup, subrepo, pushkey, obsolete, repoview
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/site-packages/mercurial/subrepo.py", line 13, in <module>
    import config, util, node, error, cmdutil, scmutil, match as matchmod
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/site-packages/mercurial/cmdutil.py", line 17, in <module>
    import crecord as crecordmod
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/site-packages/mercurial/crecord.py", line 19, in <module>
    locale.setlocale(locale.LC_ALL, '')
  File "/home/dudemcguy/local-yt-2015-09-08/yt-x86_64/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

--
-- Sent from a computer.

Nathan Goldbaum

unread,
Jun 6, 2016, 11:18:30 AM6/6/16
to enzo...@googlegroups.com
This apparently happens when your locale is uninitialized:


I bet it would work if you could set the following environment variables in whatever python process is importing mercurial:

LANG en_US.UTF-8
LANGUAGE en_US:en
LC_ALL en_US.UTF-8  

It looks like this is actually a bug in mercurial, and they should do something similar to what pip does to avoid this error. I've gone ahead and filed an issue in their bug tracker:


-Nathan

--
You received this message because you are subscribed to the Google Groups "enzo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enzo-dev+u...@googlegroups.com.
To post to this group, send email to enzo...@googlegroups.com.
Visit this group at https://groups.google.com/group/enzo-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages