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): pybliographer-1.2.11-1.fc8.noarch 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. 3. 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__ self.toggle_native() File "/usr/share/pybliographer/Pyblio/GnomeUI/Editor.py", line 1127, in toggle_native 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.
Created attachment 291132 [details] Sample .bib file that breaks pybliographic
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.
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.
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?
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.
pybliographer-1.2.11-2.fc8 has been submitted as an update for Fedora 8
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
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.