[Python-3000] Persistent Error
Amaury Forgeot d'Arc
amauryfa at gmail.com
Fri Jun 6 10:29:10 CEST 2008
Hello,
Anand Balachandran Pillai wrote:
> Hi,
>
> I have been getting the following persistent error with Python 3.0
> since an April 15 update of the subversion trunk (svn version 62349)
>
> I am running Fedora Core 6, with kernel 2.6.22.7-57.fc6 on
> an Intel i686 SMP box. Python was compiled with gcc
> version 4.1.2 (Redhat - 4.1.2-13). Python was built with
> no additional ./configure flags.
>
> [anand at localhost py3k]$ /usr/local/bin/python
> Fatal Python error: Py_Initialize: can't initialize sys standard streams
> Traceback (most recent call last):
> File "/usr/local/lib/python3.0/io.py", line 63, in <module>
> import warnings
> File "/usr/local/lib/python3.0/warnings.py", line 283, in <module>
> bytes_warning = sys.flags.bytes_warning
> AttributeError: 'sys.flags' object has no attribute 'bytes_warning'
> Aborted
It seems that there are two problems here:
- First, there is a bug in the sys.flags structure: revision 62322
added a new flag in the underlying C structure, but did not increase
the number of fields visible from python code. This should be
corrected: in sysmodules.c, the number in the flags_desc initializer
should match the number of items in flags_fields.
- Then, it seems that warnings.py could not import the C-based
"_warnings" module. Could you modify warnings.py and remove the
"except ImportError" clause to see why?
--
Amaury Forgeot d'Arc
More information about the Python-3000
mailing list