Hello, I'm having troubles to run tracd on my MBP. It looks like the _locale module of python has not been compiled and, in fact, it's not when I do a port install python24: Traceback (most recent call last): File "/opt/local/lib/python2.4/site-packages/trac/web/main.py", line 356, in dispatch_request dispatcher.dispatch(req) File "/opt/local/lib/python2.4/site-packages/trac/web/main.py", line 206, in dispatch populate_hdf(req.hdf, self.env, req) File "/opt/local/lib/python2.4/site-packages/trac/web/main.py", line 74, in populate_hdf hdf['trac'] = { File "/opt/local/lib/python2.4/site-packages/trac/util/ datefmt.py", line 61, in format_datetime encoding = locale.getpreferredencoding() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/locale.py", line 399, in getpreferredencoding import _locale ImportError: No module named _locale Question: Is there any easy way to include this module when installing python24 or is there something special to do get trac/ postgres to run? Dom
On Oct 14, 2006, at 12:28 PM, Dominik Madon wrote:
Question: Is there any easy way to include this module when installing python24 or is there something special to do get trac/ postgres to run?
It should be included by default: % /opt/local/bin/python Python 2.4.3 (#1, May 3 2006, 17:21:42) [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import locale locale.getpreferredencoding() 'mac-roman' ^D
-- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
It should be included by default:
% /opt/local/bin/python Python 2.4.3 (#1, May 3 2006, 17:21:42) [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import locale locale.getpreferredencoding() 'mac-roman' ^D
Mine is not: % /opt/local/bin/python Python 2.4.3 (#1, Oct 5 2006, 01:31:24) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import locale locale.getpreferredencoding() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/locale.py", line 399, in getpreferredencoding import _locale ImportError: No module named _locale ^D
Did you select any variant? Dominik -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFMRvmHdd69ytuKIwRAiX1AJ99rTD93qxGoAms2rBSP/hcUEuznQCgiicq VdCSJqvz7MgrYftVGRYYP9c= =nwsP -----END PGP SIGNATURE-----
On Oct 14, 2006, at 1:18 PM, Dominik Madon wrote:
It should be included by default:
[snip]
Mine is not:
[snip]
Did you select any variant?
nope. (but I am running on a PPC machine). -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
On Oct 14, 2006, at 2:27 PM, Dominik Madon wrote:
Did you select any variant?
nope. (but I am running on a PPC machine).
I just made a check on my PPC and it works, too.
Is there something I can do to fix that? Open a bug report?
Yep, open a bug report and assign it to the maintainer (and maybe send the maintainer an email with a link to the trac ticket). If you end up figuring it out, adding the information you used to fix it to the ticket would be helpful (a patch to fix the problem would, of course, be the most helpful). -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
On 14 okt 2006, at 20.27, Dominik Madon wrote:
Did you select any variant?
nope. (but I am running on a PPC machine).
I just made a check on my PPC and it works, too.
/opt/local/bin/python Python 2.4.3 (#1, Aug 23 2006, 14:23:12) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import locale locale.getpreferredencoding() 'mac-roman'
This is on a Macbook. I saw in the thread that your locale py-package is installed, it's the C extension module that it can't find. It should be in /opt/local/lib/python2.4/lib-dynload/_locale.so. Maybe yours have been misplaced somehow? <snip> - Daniel
Daniel,
/opt/local/bin/python Python 2.4.3 (#1, Aug 23 2006, 14:23:12) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import locale locale.getpreferredencoding() 'mac-roman'
This is on a Macbook. I saw in the thread that your locale py- package is installed, it's the C extension module that it can't find. It should be in /opt/local/lib/python2.4/lib-dynload/ _locale.so. Maybe yours have been misplaced somehow?
I don't have it, however, that helps me a bit. I found that: /opt/local/lib//python2.4/lib-dynload/_locale_failed.so I will uninstall all the python stuff and rebuild it with the debug log. Dominik
This is on a Macbook. I saw in the thread that your locale py- package is installed, it's the C extension module that it can't find. It should be in /opt/local/lib/python2.4/lib-dynload/ _locale.so. Maybe yours have been misplaced somehow?
I've submitted a patch for the setup.py file but failed to add comments to the ticket (the site seems very busy). The intl library that should be used to link the _locale.so file was not properly detected. The line in the setup.py is: m = re.search(r"#s*define\s+WITH_LIBINTL\s+1\s*", data) and doesn't work for me since the pyconfig.h shows something like: #define HAVE_LIBINTL_H 1 So, I've just changed that line to: m = re.search(r"#\s*define\s+(HAVE_LIBINTL_H|WITH_LIBINTL)\s +1\s*", data) and I'm happy with it. However, I haven't checked why this works on my PPC box. Thanks Daniel and Daniel for your help. Dominik
participants (3)
-
Daniel Ericsson
-
Daniel J. Luke
-
Dominik Madon