Bug 428121 - Cannot add new entry in pybliographic to existing bibliography
Summary: Cannot add new entry in pybliographic to existing bibliography
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pybliographer
Version: 8
Hardware: noarch
OS: Linux
low
high
Target Milestone: ---
Assignee: Zoltan Kota
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-09 12:12 UTC by Matt Thompson
Modified: 2008-02-07 20:58 UTC (History)
0 users

Fixed In Version: 1.2.11-2.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-07 20:58:48 UTC
Type: ---
Embargoed:


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

Description Matt Thompson 2008-01-09 12:12:15 UTC
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.

Comment 1 Matt Thompson 2008-01-09 12:12:16 UTC
Created attachment 291132 [details]
Sample .bib file that breaks pybliographic

Comment 2 Zoltan Kota 2008-01-15 11:13:11 UTC
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 12:10:14 UTC
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 15:12:04 UTC
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 15:58:29 UTC
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 22:24:10 UTC
pybliographer-1.2.11-2.fc8 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-01-27 07:24:13 UTC
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 20:58:46 UTC
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.