Suspect intermittent failure in buildbots

I've noticed an error that comes up from time to time in python 3.0 buildbots.
The error is always similar to this one:

Traceback (most recent call last):
  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\test\test_io.py",
line 900, in testBasicIO
    self.assertEquals(f.write("abc"), 3)
  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\io.py",
line 1486, in write
    b = encoder.encode(s)
  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\encodings\ascii.py",
line 22, in encode
    return codecs.ascii_encode(input, self.errors)[0]
AttributeError: 'NoneType' object has no attribute 'ascii_encode'

The most recent is here:
http://www.python.org/dev/buildbot/3.0/AMD64%20W2k8%203.0/builds/843/step-test/0

but this already happened on various buildbots:
http://www.google.fr/search?q=%27NoneType%27+object+has+no+attribute+encode+site:mail.python.org/pipermail/python-checkins&filter=0

"x86 XP-4 3.0", "amd64 gentoo 3.0", "AMD64 W2k8 3.0", "x86 W2k8 3.0",
"g4 osx.4 3.0", "OS X x86 3.0"
"x86 XP-3 trunk"

yes, even on trunk!
Every time, a "codecs" global module variable has been reset to None,
either in a codec module (encoding/ascii.py, encoding/mac_roman.py) or
in test_io.py.
Every time, io.py is not far (which may be normal, it must have the
(Continue reading)

Guido van Rossum | 4 Oct 01:02
Favicon

Re: Suspect intermittent failure in buildbots

Module globals are also reset when the module *object* is
garbage-collected (e.g. it's removed from sys.modules and not
referenced elsewhere), but the module *dict* is still referenced. This
can happen if all uses of the module is of the form "from <module>
import <something>" where the <something> is a class or function, and
at least one of the users survives the garbage-collected module.

I suspect that something is resetting part of sys.modules content. It
is a known problem (in some parts) that encodings modules cannot be
reset that way. I suspect that there is code in the regrtest.py
framework that does this (resetting part of sys.modules) in order to
restore a clean environment in some cases. Or perhaps it's one of the
tests that does this.

On Fri, Oct 3, 2008 at 3:56 PM, Amaury Forgeot d'Arc <amauryfa <at> gmail.com> wrote:
> I've noticed an error that comes up from time to time in python 3.0 buildbots.
> The error is always similar to this one:
>
> Traceback (most recent call last):
>  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\test\test_io.py",
> line 900, in testBasicIO
>    self.assertEquals(f.write("abc"), 3)
>  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\io.py",
> line 1486, in write
>    b = encoder.encode(s)
>  File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\encodings\ascii.py",
> line 22, in encode
>    return codecs.ascii_encode(input, self.errors)[0]
> AttributeError: 'NoneType' object has no attribute 'ascii_encode'
>
(Continue reading)


Gmane