Don't add empty authors to works

Bug #605127 reported by George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Library
Confirmed
High
Anand Chitipothu

Bug Description

There's a persistent bug on WWW that spews template errors. Seems to have something to do with blank author.

Here's an example:
http://openlibrary.org/works/OL15193670W/La_Belleza_%C3%BAtil

/upstream/templates/type/work/view.tmpl: error in processing template: TypeError: sequence item 0: expected string, instance found (falling back to default template)
/upstream/templates/covers/book_cover.tmpl: error in processing template: TypeError: sequence item 0: expected string, instance found (falling back to default template)
/opt/openlibrary/production/openlibrary/plugins/upstream/templates/covers/book_cover.html: error in processing template: TypeError: sequence item 0: expected string, instance found (falling back to default template)

I notice in the error log that there are about 30 of these being thrown every day.

Revision history for this message
George (george-archive) wrote :
Changed in openlibrary:
assignee: nobody → Anand Chitipothu (anandology)
milestone: none → general-bucket
importance: Undecided → High
status: New → Confirmed
Revision history for this message
George (george-archive) wrote :

Edward said:

I fixed the templates to skip these empty authors. Here is another example that was giving the error, but doesn't do now:
http://openlibrary.org/works/OL15193521W/MzQfSihcsLPSKYOmSVG

Revision history for this message
Edward Betts (edwardbetts) wrote :

http://openlibrary.org/works/OL15193521W.json says:

"authors": [{"type": {"key": "/type/author_role"}}]

We shouldn't be adding blank authors to works in Open Library.

summary: - Template error on production - "sequence item 0;" ?
+ Don't add empty authors to works
Revision history for this message
Anand Chitipothu (anandology) wrote : Re: [Bug 605127] Re: Don't add empty authors to works

Fix committed.

Working on a script to fix the existing ones.

Revision history for this message
Anand Chitipothu (anandology) wrote :

Found 116 works records with none authors and fixed all of them. I
used the dump on 2010-06-30 to find the bad ones. Some more might have
got added after that. I need to check the newly added works.

Revision history for this message
Anand Chitipothu (anandology) wrote :

Fixed the remaining 210 more records from 2010-07-31 dump.

Changed in openlibrary:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Revision history for this message
Anand Chitipothu (anandology) wrote :

Looks like there are some more. reopening the bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.