Hi, I installed Python 1.5.2 and Zope. When I tried to fire up the Python server, the following error occurred ImportError: cannot import name tzname Well, it seems that in python 1.5.2 there is no more function "tzname". I currently fixed it by simply hardcoding the function in TimeDate.py, but this is no real solution. Is this a bug in python 1.5.2? Best Regards, Hermann -- Hermann Himmelbauer EMail: dusty@strike.wu-wien.ac.at.at Tel.: ++43-2243-26562 Fax: ++43-2243-2230527 Addr.: Martinstr. 18/2, A-3400 Klosterneuburg Austria (Europe)
On Thu, 22 Apr 1999, Hermann Himmelbauer wrote:
Hi, I installed Python 1.5.2 and Zope. When I tried to fire up the Python server, the following error occurred
ImportError: cannot import name tzname
Well, it seems that in python 1.5.2 there is no more function "tzname". I currently fixed it by simply hardcoding the function in TimeDate.py, but this is no real solution.
Is this a bug in python 1.5.2?
Yes, it's a python/libc related bug. The bug is in timemodules.c and deals with testing for the libc version. Currently the fix (its still being tested on all systems) is to alter line 619 in timemodule.c (and recompile, of course)... from: #if defined(HAVE_TZNAME) && !defined(__GNU_LIBRARY__) to: #if defined(HAVE_TZNAME) && !defined(__GLIBC__) Hope this helps, --- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
Opps... forgot to mention that this bug only shows up with libc5 systems. If you use glibc2/libc6, you don't have to worry. On Thu, 22 Apr 1999, John Eikenberry wrote:
On Thu, 22 Apr 1999, Hermann Himmelbauer wrote:
ImportError: cannot import name tzname
Is this a bug in python 1.5.2?
Yes, it's a python/libc related bug. The bug is in timemodules.c and deals with testing for the libc version. Currently the fix (its still being tested on all systems) is to alter line 619 in timemodule.c (and recompile, of course)...
from:
#if defined(HAVE_TZNAME) && !defined(__GNU_LIBRARY__)
to:
#if defined(HAVE_TZNAME) && !defined(__GLIBC__)
Hope this helps,
---
John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
--- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
participants (2)
-
Hermann Himmelbauer -
John Eikenberry