Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AndreasHasenkopf mannequin opened this issue Jul 7, 2011 · 3 comments
Closed

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

AndreasHasenkopf mannequin opened this issue Jul 7, 2011 · 3 comments

Comments

@AndreasHasenkopf
Copy link
Mannequin

AndreasHasenkopf mannequin commented Jul 7, 2011

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']

@AndreasHasenkopf
Copy link
Mannequin Author

AndreasHasenkopf mannequin commented Jul 7, 2011

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

@AndreasHasenkopf AndreasHasenkopf mannequin added the topic-XML label Jul 7, 2011
@AndreasHasenkopf
Copy link
Mannequin Author

AndreasHasenkopf mannequin commented Jul 7, 2011

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

@AndreasHasenkopf AndreasHasenkopf mannequin removed the topic-XML label Jul 7, 2011
@AndreasHasenkopf
Copy link
Mannequin Author

AndreasHasenkopf mannequin commented Jul 7, 2011

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

@AndreasHasenkopf AndreasHasenkopf mannequin closed this as completed Jul 7, 2011
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant