[New-bugs-announce] [issue12511] class/instance xyz has no attribute '_abc'
report at bugs.python.org
Thu Jul 7 12:13:10 CEST 2011
New submission from Andreas Hasenkopf <webmaster at hasenkopf2000.net>:
I'm using 64bit Arch Linux and Python 2.7.2 compiled with GCC 4.6.1.
I have noticed in several ocassions that the interpreter is complaining about
AttributeError: XMLGenerator instance has no attribute '_write' (in case of module xml.sax.saxutils.XMLGenerator)
AttributeError: RendererGDK instance has no attribute '_text2path' (in case of matplotlib when trying to use TeX formatting of text)
When I have a look into the corresponding modules I can clearly see method definitions (e.g. def _write(self, text) in line 97 of xml/sax/saxutils.py
I have no clue, why it is happening in some modules, but not in others. If a write my own module containing a class with a _write method it is working fine.
If I write a class derived from xml.sax.saxutils.XMLGenerator and overwrite the _write method it is known to the system, but many of the attributes beginning with an underscore appear still to be unknown...
This is very odd?!
title: class/instance xyz has no attribute '_abc'
versions: Python 2.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce