[Booki-dev] [Booki and Objavi Development] #317: Archive.org epub is broken after editing

James Simmons nicestep at gmail.com
Fri Nov 12 19:24:33 PST 2010


The dropbox link to the booki-zip is:

http://dl.dropbox.com/u/8919415/thirteenwomen-en-2010.11.12-08.45.51.zip

> This is, I believe, the relevant part of the objavi log:
>
> Starting request for %s
> /objavi.cgi
> effective query is:
> {'license': 'GPLv2+', 'title': 'Thirteen Women', 'destination':
> 'nowhere', 'max-age': '0', 'book': 'thirteen-women', 'mode': 'epub',
> 'server': '127.0.0.1:8000', 'booksize': 'COMICBOOK'}
> making epub with
> {'book': 'thirteen-women',
>  'booksize': 'COMICBOOK',
>  'destination': 'nowhere',
>  'license': 'GPLv2+',
>  'max-age': '0',
>  'mode': 'epub',
>  'server': '127.0.0.1:8000',
>  'title': 'Thirteen Women'}
> templates/nowhere.txt
> text/plain; charset=utf-8
> nowhere
> sync
> in get_watchers. method 'sync', callback None, destination 'nowhere'
> watchers are set([<bound method Context.log_notifier of
> <__main__.Context object at 0xb74b864c>>])
> *** Starting new book thirteenwomen-en-2010.11.07-21.12.04.epub ***
> notify_watcher called with 'start'
> ******* got message "start"
> fetching zip from http://127.0.0.1:8000/export/thirteen-women/export
> notify_watcher called with 'fetch_zip'
> ******* got message "fetch_zip"
> {u'http://booki.cc/': {u'book': {u'': [u'ThirteenWomen']},
>                       u'server': {u'': [u'www.booki.cc']}},
>  u'http://purl.org/dc/elements/1.1/': {u'creator': {u'': [u'Tiffany Thayer']},
>                                       u'date': {u'last-modified':
> [u'2010.11.07-00.00'],
>                                                 u'published':
> [u'2010.11.07-21.12'],
>                                                 u'start':
> [u'2010.10.23-19.47']},
>                                       u'description': {u'': [u"A
> spicy crime novel made into a movie in the 1930's featuring Myrna Loy
> as the villainess plotting to get revenge on the girls that shunned
> her at school.  While the movie actually had fewer than thirteen women
> in it, in the novel you get the full set.  The Stanford copyright
> renewal database shows several renewals for Thayer's books, but not
> this one."]},
>                                       u'identifier': {u'': [u'ThirteenWomen'],
>                                                       u'booki.cc':
> [u'http://127.0.0.1:8000/thirteen-women/2010.11.07-21.12']},
>                                       u'identifier{archive.org}':
> {u'': [u'ThirteenWomen']},
>                                       u'language': {u'': [u'eng']},
>                                       u'publisher': {u'': [u'James Simmons']},
>                                       u'subject': {u'': [u'murder; novel']},
>                                       u'title': {u'': [u'Thirteen Women']},
>                                       u'type': {u'': [u'Text']}},
>  u'http://www.idpf.org/2007/opf': {u'cover': {u'': [u'cover-image']}}}
> current values [], proposed 'GPLv2+'
> current values [u'Thirteen Women'], proposed 'Thirteen Women'
> current values [u'eng'], proposed u'eng'
> current values [], proposed 'None'
> notify_watcher called with '__init__'
> ******* got message "__init__"
> uncompressed: 27172, compressed: 11156, splits: 0
> uncompressed: 20247, compressed: 8480, splits: 0
> uncompressed: 50742, compressed: 20010, splits: 0
> uncompressed: 66054, compressed: 20084, splits: 0
> uncompressed: 35859, compressed: 12990, splits: 0
> uncompressed: 80104, compressed: 31169, splits: 0
> uncompressed: 1159, compressed: 562, splits: 0
> uncompressed: 39626, compressed: 16530, splits: 0
> uncompressed: 42671, compressed: 17180, splits: 0
> uncompressed: 805, compressed: 449, splits: 0
> uncompressed: 16927, compressed: 7251, splits: 0
> {u'ch009_chapter-five.html': u'ch009_chapter-five.xhtml',
> u'ch006_chapter-two.html': u'ch006_chapter-two.xhtml',
> u'ch014_chapter-nine.html': u'ch014_chapter-nine.xhtml',
> u'ch002_pages.html': u'ch002_pages.xhtml',
> u'ch013_chapter-eight.html': u'ch013_chapter-eight.xhtml',
> u'ch001_title-page.html': u'ch001_title-page.xhtml',
> u'ch012_chapter-seven.html': u'ch012_chapter-seven.xhtml',
> u'ch010_chapter-six.html': u'ch010_chapter-six.xhtml',
> u'ch004_chapter-one.html': u'ch004_chapter-one.xhtml',
> u'ch005_part-two.html': u'ch005_part-two.xhtml',
> u'ch008_chapter-four.html': u'ch008_chapter-four.xhtml'}
> (<Element navMap at b733bb94>, 1, u'Beginning', u'ch001_title-page.xhtml')
> (<Element navPoint at b733bb44>, 2, u'Title', u'ch001_title-page.xhtml')
> (<Element navPoint at b733bb44>, 3, u'Illustrations', u'ch002_pages.xhtml')
> (<Element navMap at b733bb94>, 4, u'Part One', u'ch004_chapter-one.xhtml')
> (<Element navPoint at b733bb44>, 5, u'Chapter One', u'ch004_chapter-one.xhtml')
> (<Element navPoint at b733bb44>, 6, u'Chapter Two', u'ch005_part-two.xhtml')
> (<Element navPoint at b733bb44>, 7, u'Chapter Three',
> u'ch006_chapter-two.xhtml')
> (<Element navMap at b733bb94>, 8, u'Part Two', u'ch008_chapter-four.xhtml')
> (<Element navPoint at b733bb44>, 9, u'Chapter Four',
> u'ch008_chapter-four.xhtml')
> (<Element navPoint at b733bb44>, 10, u'Chapter Five',
> u'ch009_chapter-five.xhtml')
> (<Element navPoint at b733bb44>, 11, u'Chapter Six', u'ch010_chapter-six.xhtml')
> (<Element navMap at b733bb94>, 12, u'Part Three', u'ch012_chapter-seven.xhtml')
> (<Element navPoint at b733bbe4>, 13, u'Chapter Seven',
> u'ch012_chapter-seven.xhtml')
> (<Element navPoint at b733bbe4>, 14, u'Chapter Eight',
> u'ch013_chapter-eight.xhtml')
> (<Element navPoint at b733bbe4>, 15, u'Chapter Nine',
> u'ch014_chapter-nine.xhtml')
> {u'http://booki.cc/': {u'book': {u'': [u'ThirteenWomen']},
>                       'dir': {'': ['None']},
>                       u'server': {u'': [u'www.booki.cc']}},
>  u'http://purl.org/dc/elements/1.1/': {u'creator': {u'': [u'Tiffany Thayer']},
>                                       u'date': {u'last-modified':
> [u'2010.11.07-00.00'],
>                                                 u'published':
> [u'2010.11.07-21.12'],
>                                                 u'start':
> [u'2010.10.23-19.47']},
>                                       u'description': {u'': [u"A
> spicy crime novel made into a movie in the 1930's featuring Myrna Loy
> as the villainess plotting to get revenge on the girls that shunned
> her at school.  While the movie actually had fewer than thirteen women
> in it, in the novel you get the full set.  The Stanford copyright
> renewal database shows several renewals for Thayer's books, but not
> this one."]},
>                                       u'identifier': {u'': [u'ThirteenWomen'],
>                                                       u'booki.cc':
> [u'http://127.0.0.1:8000/thirteen-women/2010.11.07-21.12']},
>                                       u'identifier{archive.org}':
> {u'': [u'ThirteenWomen']},
>                                       u'language': {u'': [u'eng']},
>                                       u'publisher': {u'': [u'James Simmons']},
>                                       'rights': {'License': ['GPLv2+']},
>                                       u'subject': {u'': [u'murder; novel']},
>                                       u'title': {u'': [u'Thirteen Women']},
>                                       u'type': {u'': [u'Text']}},
>  u'http://www.idpf.org/2007/opf': {u'cover': {u'': [u'cover-image']}}}
> [(u'{http://purl.org/dc/elements/1.1/}publisher', u'James Simmons',
> {}), ('{http://purl.org/dc/elements/1.1/}rights', 'GPLv2+', {'scheme':
> 'License'}), (u'{http://purl.org/dc/elements/1.1/}description', u"A
> spicy crime novel made into a movie in the 1930's featuring Myrna Loy
> as the villainess plotting to get revenge on the girls that shunned
> her at school.  While the movie actually had fewer than thirteen women
> in it, in the novel you get the full set.  The Stanford copyright
> renewal database shows several renewals for Thayer's books, but not
> this one.", {}), (u'{http://purl.org/dc/elements/1.1/}language',
> u'eng', {}), (u'{http://purl.org/dc/elements/1.1/}creator', u'Tiffany
> Thayer', {}), (u'{http://purl.org/dc/elements/1.1/}identifier{archive.org}',
> u'ThirteenWomen', {}), (u'{http://purl.org/dc/elements/1.1/}title',
> u'Thirteen Women', {}), (u'{http://purl.org/dc/elements/1.1/}date',
> u'2010.10.23-19.47', {'scheme': u'start'}),
> (u'{http://purl.org/dc/elements/1.1/}date', u'2010.11.07-00.00',
> {'scheme': u'last-modified'}),
> (u'{http://purl.org/dc/elements/1.1/}date', u'2010.11.07-21.12',
> {'scheme': u'published'}),
> (u'{http://purl.org/dc/elements/1.1/}identifier', u'ThirteenWomen',
> {}), (u'{http://purl.org/dc/elements/1.1/}identifier',
> u'http://127.0.0.1:8000/thirteen-women/2010.11.07-21.12', {'scheme':
> u'booki.cc'}), (u'{http://purl.org/dc/elements/1.1/}type', u'Text',
> {}), (u'{http://purl.org/dc/elements/1.1/}subject', u'murder; novel',
> {})]
> notify_watcher called with 'FINISHED'
> ******* got message "FINISHED"
> NOT removing '/home/jim/olpc/objavi2/htdocs/tmp/thirteenwomen-en-2010.11.07-21.12.04.epubOsipJt',
> containing the following files:
> notify_watcher called with 'cleanup'
> ******* got message "cleanup"
> Traceback (most recent call last):
>  File "/home/jim/olpc/objavi2/htdocs/objavi.cgi", line 479, in <module>
>    main()
>  File "/home/jim/olpc/objavi2/htdocs/objavi.cgi", line 472, in main
>    output_function(args)
>  File "/home/jim/olpc/objavi2/htdocs/objavi.cgi", line 426, in mode_epub
>    book.make_epub(use_cache=config.USE_CACHED_IMAGES)
>  File "/home/jim/olpc/objavi2/objavi/fmbook.py", line 1030, in make_epub
>    ebook.write_opf(meta_info)
>  File "/home/jim/olpc/objavi2/objavi/epub_utils.py", line 157, in write_opf
>    el = etree.SubElement(metadata, key, attrs)
>  File "lxml.etree.pyx", line 2437, in lxml.etree.SubElement
> (src/lxml/lxml.etree.c:47696)
>  File "apihelpers.pxi", line 190, in lxml.etree._makeSubElement
> (src/lxml/lxml.etree.c:11210)
>  File "apihelpers.pxi", line 1458, in lxml.etree._tagValidOrRaise
> (src/lxml/lxml.etree.c:21892)
> ValueError: Invalid tag name u'identifier{archive.org}'
> Starting request for %s
> /
> effective query is:
> {}
> en.flossmanuals.net
> htdocs/static/en.flossmanuals.net.css
> valid but not used inputs: set(['engine', 'destination',
> 'cgi-context', 'method', 'callback', 'pdftype'])
> invalid form inputs: set(['css-url'])
> Starting request for %s
> /?server=127.0.0.1:8000&book=null&mode=booklist
> effective query is:
> {'book': 'null', 'mode': 'booklist', 'server': '127.0.0.1:8000'}
> getting booklist: http://127.0.0.1:8000/list-books.json
> Starting request for %s
> /?server=127.0.0.1:8000&book=null&mode=booklist
> effective query is:
> {'book': 'null', 'mode': 'booklist', 'server': '127.0.0.1:8000'}
> getting booklist: http://127.0.0.1:8000/list-books.json
> Starting request for %s
> /
> argument 'page-numbers' is not valid ('auto')
> effective query is:
> {'book': 'thirteen-women', 'booksize': 'COMICBOOK', 'mode':
> 'bookizip', 'license': 'GPLv2+', 'server': '127.0.0.1:8000'}
> making bookizip with
> {'book': 'thirteen-women',
>  'booksize': 'COMICBOOK',
>  'license': 'GPLv2+',
>  'mode': 'bookizip',
>  'server': '127.0.0.1:8000'}
> templates/progress.html
> text/html; charset=utf-8
> html
> sync
> in get_watchers. method 'sync', callback None, destination 'html'
> watchers are set([<bound method Context.javascript_notifier of
> <__main__.Context object at 0xb750764c>>, <bound method
> Context.log_notifier of <__main__.Context object at 0xb750764c>>])
> *** Starting new book thirteenwomen-en-2010.11.12-08.45.51.zip ***
> notify_watcher called with 'start'
> ******* got message "start"
> WARNING: trying to use cached booki-zip
> If you are debugging booki-zip creation, you will go CRAZY unless you
> switch this off
> 'htdocs/booki-books/thirteenwomen-en-2010.11.07-21.12.06.zip'
> htdocs/booki-books/thirteenwomen-en-2010.11.07-21.12.06.zip is too
> old, must reload
> fetching zip from http://127.0.0.1:8000/export/thirteen-women/export
> notify_watcher called with 'fetch_zip'
> ******* got message "fetch_zip"
> {u'http://booki.cc/': {u'book': {u'': [u'ThirteenWomen']},
>                       u'server': {u'': [u'www.booki.cc']}},
>  u'http://purl.org/dc/elements/1.1/': {u'creator': {u'': [u'Tiffany Thayer']},
>                                       u'date': {u'last-modified':
> [u'2010.11.07-00.00'],
>                                                 u'published':
> [u'2010.11.12-14.45'],
>                                                 u'start':
> [u'2010.10.23-19.47']},
>                                       u'description': {u'': [u"A
> spicy crime novel made into a movie in the 1930's featuring Myrna Loy
> as the villainess plotting to get revenge on the girls that shunned
> her at school.  While the movie actually had fewer than thirteen women
> in it, in the novel you get the full set.  The Stanford copyright
> renewal database shows several renewals for Thayer's books, but not
> this one."]},
>                                       u'identifier': {u'': [u'ThirteenWomen'],
>                                                       u'booki.cc':
> [u'http://127.0.0.1:8000/thirteen-women/2010.11.12-14.45']},
>                                       u'identifier{archive.org}':
> {u'': [u'ThirteenWomen']},
>                                       u'language': {u'': [u'eng']},
>                                       u'publisher': {u'': [u'James Simmons']},
>                                       u'subject': {u'': [u'murder; novel']},
>                                       u'title': {u'': [u'Thirteen Women']},
>                                       u'type': {u'': [u'Text']}},
>  u'http://www.idpf.org/2007/opf': {u'cover': {u'': [u'cover-image']}}}
> current values [], proposed 'GPLv2+'
> current values [u'eng'], proposed u'eng'
> current values [], proposed 'None'
> notify_watcher called with '__init__'
> ******* got message "__init__"
> Publishing 'htdocs/booki-books/thirteenwomen-en-2010.11.12-08.45.55.zip'
> as '/home/jim/olpc/objavi2/htdocs/books/thirteenwomen-en-2010.11.12-08.45.51.zip'
> cp -l htdocs/booki-books/thirteenwomen-en-2010.11.12-08.45.55.zip
> /home/jim/olpc/objavi2/htdocs/books/thirteenwomen-en-2010.11.12-08.45.51.zip
> cp returned 0 and produced
> stdout:
> stderr:
> notify_watcher called with 'publish_bookizip'
> ******* got message "publish_bookizip"
> notify_watcher called with 'FINISHED'
> ******* got message "FINISHED"
> NOT removing '/home/jim/olpc/objavi2/htdocs/tmp/thirteenwomen-en-2010.11.12-08.45.51.zipudxZzG',
> containing the following files:
> notify_watcher called with 'cleanup'
> ******* got message "cleanup"


James Simmons



More information about the Booki-dev mailing list