Issue 12511: class/instance xyz has no attribute '_abc' (original) (raw)
Issue12511
Created on 2011-07-07 10:13 by Andreas.Hasenkopf, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg139966 - (view) | Author: Andreas Hasenkopf (Andreas.Hasenkopf) | Date: 2011-07-07 10:13 |
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) or 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?! | ||
msg139976 - (view) | Author: Andreas Hasenkopf (Andreas.Hasenkopf) | Date: 2011-07-07 13:18 |
I'd like to mention that Python 2.6.7 does not show this erroneous behavior. In Python 2.6.7 I can call the _write method of xml.sax.saxutils.XMLGenerator... Is this a bug or a feature in 2.7?? | ||
msg139977 - (view) | Author: Andreas Hasenkopf (Andreas.Hasenkopf) | Date: 2011-07-07 13:24 |
The problem appeared to be the package from the Arch Linux repo. Compiling the source codes myselfes gave me a Python interpreter not showing this bug... |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:19 | admin | set | github: 56720 |
2011-07-07 14:40:39 | benjamin.peterson | set | resolution: accepted -> not a bug |
2011-07-07 13:24:19 | Andreas.Hasenkopf | set | status: open -> closedresolution: acceptedmessages: + |
2011-07-07 13🔞25 | Andreas.Hasenkopf | set | messages: + components: - XML |
2011-07-07 10:13:09 | Andreas.Hasenkopf | create |