Skip to content

class/instance xyz has no attribute '_abc' #56720

Closed

Description

@AndreasHasenkopf
BPO 12511

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2011-07-07.13:24:19.563>
created_at = <Date 2011-07-07.10:13:09.954>
labels = ['invalid']
title = "class/instance xyz has no attribute '_abc'"
updated_at = <Date 2011-07-07.14:40:39.596>
user = 'https://bugs.python.org/AndreasHasenkopf'

bugs.python.org fields:

activity = <Date 2011-07-07.14:40:39.596>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2011-07-07.13:24:19.563>
closer = 'Andreas.Hasenkopf'
components = []
creation = <Date 2011-07-07.10:13:09.954>
creator = 'Andreas.Hasenkopf'
dependencies = []
files = []
hgrepos = []
issue_num = 12511
keywords = []
message_count = 3.0
messages = ['139966', '139976', '139977']
nosy_count = 1.0
nosy_names = ['Andreas.Hasenkopf']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue12511'
versions = ['Python 2.7']

Activity

  1. AndreasHasenkopf commented on Jul 7, 2011

    AndreasHasenkopfmannequin
    MannequinAuthor

    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?!

  2. AndreasHasenkopf commented on Jul 7, 2011

    AndreasHasenkopfmannequin
    MannequinAuthor

    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??

  3. AndreasHasenkopf commented on Jul 7, 2011

    AndreasHasenkopfmannequin
    MannequinAuthor

    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...

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions