[MacPorts] #22584: Mercurial missing _locale

MacPorts noreply at macports.org
Tue Nov 17 09:03:31 PST 2009


#22584: Mercurial missing _locale
------------------------------+---------------------------------------------
 Reporter:  wobbet@…          |       Owner:  blb@…           
     Type:  defect            |      Status:  new             
 Priority:  Normal            |   Milestone:                  
Component:  ports             |     Version:  1.8.0           
 Keywords:                    |        Port:  python26        
------------------------------+---------------------------------------------
Changes (by jmr@…):

 * cc: mcalhoun@…, deric@… (added)
  * keywords:  mercurial _locale =>
  * owner:  macports-tickets@… => blb@…
  * port:  mercurial => python26


Old description:

> Running SnowLeopard on 32-bit MacBookPro2,2.
>
> Config edited file to add +universal for all ports.
>
> I performed a
>   sudo port clean --all all
>   sudo port install python26
>   sudo port install mercurial
>
> Both reported success.
>
> When I attempt to execute
>   hg clone ...
>
> I receive the following trace indicating that _locale is missing.
>
> Traceback (most recent call last):
>   File "/opt/local/bin/hg", line 27, in <module>
>     mercurial.dispatch.run()
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/dispatch.py",
> line 16, in run
>     sys.exit(dispatch(sys.argv[1:]))
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/dispatch.py",
> line 27, in dispatch
>     return _runcatch(u, args)
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/dispatch.py",
> line 97, in _runcatch
>     ui.warn(_("abort: could not import module %s!\n") % m)
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/i18n.py",
> line 43, in gettext
>     return u.encode(encoding.encoding, "replace")
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/demandimport.py",
> line 75, in __getattribute__
>     self._load()
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/demandimport.py",
> line 47, in _load
>     mod = _origimport(head, globals, locals)
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/encoding.py",
> line 22, in <module>
>     encoding = locale.getpreferredencoding() or 'ascii'
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py",
> line 531, in getpreferredencoding
>     import _locale
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
> /site-packages/mercurial/demandimport.py",
> line 84, in _demandimport
>     return _origimport(name, globals, locals, fromlist)
> ImportError: No module named _locale

New description:

 Running SnowLeopard on 32-bit MacBookPro2,2.

 Config edited file to add +universal for all ports.

 I performed a
   sudo port clean --all all
   sudo port install python26
   sudo port install mercurial

 Both reported success.

 When I attempt to execute
   hg clone ...

 I receive the following trace indicating that _locale is missing.
 {{{
 Traceback (most recent call last):
   File "/opt/local/bin/hg", line 27, in <module>
     mercurial.dispatch.run()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py",
 line 16, in run
     sys.exit(dispatch(sys.argv[1:]))
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py",
 line 27, in dispatch
     return _runcatch(u, args)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/dispatch.py",
 line 97, in _runcatch
     ui.warn(_("abort: could not import module %s!\n") % m)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/i18n.py",
 line 43, in gettext
     return u.encode(encoding.encoding, "replace")
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/demandimport.py",
 line 75, in __getattribute__
     self._load()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/demandimport.py",
 line 47, in _load
     mod = _origimport(head, globals, locals)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/encoding.py",
 line 22, in <module>
     encoding = locale.getpreferredencoding() or 'ascii'
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py",
 line 531, in getpreferredencoding
     import _locale
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/mercurial/demandimport.py",
 line 84, in _demandimport
     return _origimport(name, globals, locals, fromlist)
 ImportError: No module named _locale
 }}}

--

Comment:

 If _locale is missing entirely that would be a problem with python26. Can
 you import _locale manually in an interactive interpreter? Is
 `/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /lib-dynload/_locale.so` present, and if so, what are the permissions on
 it? (Could be a umask issue a la #21389.)

-- 
Ticket URL: <http://trac.macports.org/ticket/22584#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list