'Person' object has no attribute 'text'
Issue #72
resolved
But the attribute is used here: https://bitbucket.org/pybtex-devs/pybtex/src/ccb8c9ebdb309c4d738f18b29561cd390b48e131/pybtex/style/template.py?at=master&fileviewer=file-view-default#template.py-287
def names(children, data, role, **kwargs):
"""Return formatted names."""
assert not children
try:
persons = data.persons[role]
except KeyError:
# role is a bibtex field so it makes sense
# to raise FieldIsMissing; optional will catch it
raise FieldIsMissing(role, data)
return join(**kwargs) [[person.text for person in persons]].format_data(data)
See last line of the method.
Comments (3)
-
-
- marked as enhancement
Person.text is set by is set by
pybtex.style.formatting.BaseStyle.format_entries()
, so it's not really a bug. But yes, I agree it's a bad design and should be fixed some day. -
- changed status to resolved
- Log in to comment
Issue
#22was marked as a duplicate of this issue.