Bug 428121 - Cannot add new entry in pybliographic to existing bibliography
Cannot add new entry in pybliographic to existing bibliography
Product: Fedora
Classification: Fedora
Component: pybliographer (Show other bugs)
noarch Linux
low Severity high
: ---
: ---
Assigned To: Zoltan Kota
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-09 07:12 EST by Matt Thompson
Modified: 2008-02-07 15:58 EST (History)
0 users

See Also:
Fixed In Version: 1.2.11-2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-07 15:58:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Sample .bib file that breaks pybliographic (409 bytes, text/plain)
2008-01-09 07:12 EST, Matt Thompson
no flags Details

  None (edit)
Description Matt Thompson 2008-01-09 07:12:15 EST
Description of problem:
When I try to add a new entry to an existing .bib file, I get no popup and a
Python traceback in the terminal.

Version-Release number of selected component (if applicable):

How reproducible:
Always with this file.

Steps to Reproduce:
1. Open .bib file in pybliographic
2. Attempt to create new entry with the "+" toolbar item.
Actual results:
The expected add dialog does not occur and the following traceback is seen on
the command line:

Traceback (most recent call last):
  File "/usr/share/pybliographer/Pyblio/GnomeUI/Document.py", line 933, in add_entry
    edit = Editor.Editor (self.data, entry, self.w, _("Create new entry"))
  File "/usr/share/pybliographer/Pyblio/GnomeUI/Editor.py", line 1082, in __init__
  File "/usr/share/pybliographer/Pyblio/GnomeUI/Editor.py", line 1127, in
    self.editor = NativeEditor(self.database, self.current)
  File "/usr/share/pybliographer/Pyblio/GnomeUI/Editor.py", line 964, in __init__
    self.original = database.get_native(entry)
  File "/usr/share/pybliographer/Pyblio/Format/BibTeX.py", line 386, in get_native
    entry_write(entry, stream)
  File "/usr/share/pybliographer/Pyblio/Format/BibTeX.py", line 419, in entry_write
    output.write('@%s{%s,\n' % (tp.name, entry.key.key))
AttributeError: 'NoneType' object has no attribute 'key'

Expected results:
A dialog wherein one can add a new entry.

Additional info:
While this crash happens with a large bibliography, it also happens with the
file attached below...which has ONE entry.  I *can* add an entry if I start
pybliographic and do not open a file.
Comment 1 Matt Thompson 2008-01-09 07:12:16 EST
Created attachment 291132 [details]
Sample .bib file that breaks pybliographic
Comment 2 Zoltan Kota 2008-01-15 06:13:11 EST
I checked your attached bibtex entry under rawhide with
pybliographer-1.2.11-1.fc8. After opening the bibtex file, I could add a new
entry without any problem. However, if I set the option "Native-as-default" I
get the same traceback! Please, check the menu Settings -> Preferences -> Gnome,
and there switch off the option "[] Should we edit the entries in their native
format by default?", if it is set on. Does it help?
Probably it's a bug. I will discuss it upstream.
Comment 3 Matt Thompson 2008-01-15 07:10:14 EST
You are correct.  I did have "Native-as-default" set.  I never thought that
would be the problem.

And unsetting that bit and restarting does allow me to enter a new entry.
Comment 4 Zoltan Kota 2008-01-16 10:12:04 EST
Ok. So you expected to get the normal window for adding the new entry, right?
Or do you think it would be useful to add a new entry in the native (editing)
form? In the first case that option should be applied only for editing existing
entries. In the second case, adding new entry should pop an empty native editing
window (practically). 
What is your opinion, what would you prefer?
Comment 5 Matt Thompson 2008-01-16 10:58:29 EST
You know, I hadn't really thought about it.  I guess in Pybliographic, I assume
I'll always get the normal dialog/menu style of entry when I want to add a new
entry even if I have native editing turned on.  Since, as you say, a "blank"
editing window means the graphic part is sort of not needed.

The only way I could see using the native editor for new entry is if there was a
kbibtex-style dropdown where you could select the *type* of new entry.  Then the
native editing window could appear with a @Article template, say, with the
required (blank) fields.
Comment 6 Fedora Update System 2008-01-25 17:24:10 EST
pybliographer-1.2.11-2.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-01-27 02:24:13 EST
pybliographer-1.2.11-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pybliographer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/F8/FEDORA-2008-1088
Comment 8 Fedora Update System 2008-02-07 15:58:46 EST
pybliographer-1.2.11-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.