Hello,
After a very rocky installation I now have Booktype 2.0 running on Ubuntu 14.04.
When I try and publish, Celery picks up and execute the job but encounters one of two errors (depending on the type of output requested). For PDF, I end up with a PDF file containing the title and TOC, but no copy text and the following errors:
[2015-10-21 15:10:13,773: INFO/MainProcess] Received task: booktype.apps.edit.tasks.publish_book[5bcabf4c-a1f3-433d-9e9f-52c371df6b32]
[2015-10-21 15:10:13,801: INFO/MainProcess] Received task: convert[0b42660a-9e7e-4997-8167-332081c20d85]
[2015-10-21 15:10:14,271: INFO/MainProcess] Received task: convert_one[mpdf:f0489729-088d-4939-9e98-1e0da39a4cdc]
[2015-10-21 15:10:14,280: WARNING/Worker-10] /usr/local/lib/python2.7/dist-packages/celery/result.py:45: RuntimeWarning: Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks
In Celery 3.2 this will result in an exception being
raised instead of just being a warning.
warnings.warn(RuntimeWarning(E_WOULDBLOCK))
[2015-10-21 15:10:14,288: WARNING/Worker-9] /usr/local/src/booktype/lib/booktype/utils/misc.py:404: RuntimeWarning: Argument is not an unicode object. Passing an encoded string will likely have unexpected results.
text = unidecode.unidecode(text)
[2015-10-21 15:10:15,016: INFO/Worker-9] Conversion lasted 0:00:00.738524.
[2015-10-21 15:10:15,029: INFO/MainProcess] Task convert_one[mpdf:f0489729-088d-4939-9e98-1e0da39a4cdc] succeeded in 0.756924312002s: {'output':...
[2015-10-21 15:10:15,303: INFO/MainProcess] Task convert[0b42660a-9e7e-4997-8167-332081c20d85] succeeded in 1.495518373s: {u'mpdf:f0489729-088d-4939-9e98-1e0da39a4cdc': }
[2015-10-21 15:10:15,405: INFO/MainProcess] Task booktype.apps.edit.tasks.publish_book[5bcabf4c-a1f3-433d-9e9f-52c371df6b32] succeeded in 1.632006408s: None
When choosing EPUB, MOBI or XHTML I get an error reporting back with no file available and the following errors in the Celery log:
[2015-10-21 15:11:53,267: INFO/MainProcess] Received task: booktype.apps.edit.tasks.publish_book[4124adbb-7526-46a8-96d2-90f5081e0314]
[2015-10-21 15:11:53,294: INFO/MainProcess] Received task: convert[47ad2b19-b766-4458-8cd1-3f1459441ad8]
[2015-10-21 15:11:53,736: INFO/MainProcess] Received task: convert_one[epub:174c40f1-ed04-4d01-a700-f5bc6ab309ff]
[2015-10-21 15:11:53,891: ERROR/MainProcess] Task convert_one[epub:174c40f1-ed04-4d01-a700-f5bc6ab309ff] raised unexpected: Error(None,)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/local/src/booktype/lib/booktype/apps/convert/tasks.py", line 49, in decorated_func
return func(request, *args, **kwargs)
File "/usr/local/src/booktype/lib/booktype/apps/convert/tasks.py", line 65, in convert_one
result = run_conversion(*args, **kwargs)
File "/usr/local/src/booktype/lib/booktype/convert/runner.py", line 58, in run_conversion
conversion_result = converter.convert(book, output)
File "/usr/local/src/booktype/lib/booktype/convert/epub/converter.py", line 147, in convert
epub_writer.process()
File "/home/ubuntu/src/ebooklib/ebooklib/epub.py", line 559, in process
plg.html_before_write(self.book, item)
File "/usr/local/src/booktype/lib/booktype/convert/epub/writerplugin.py", line 40, in html_before_write
root = ebooklib.utils.parse_html_string(item.content)
File "/home/ubuntu/src/ebooklib/ebooklib/utils.py", line 39, in parse_html_string
html_tree = html.document_fromstring(s , parser=utf8_parser)
File "/usr/local/lib/python2.7/dist-packages/lxml/html/__init__.py", line 614, in document_fromstring
value = etree.fromstring(html, parser, **kw)
File "lxml.etree.pyx", line 3103, in lxml.etree.fromstring (src/lxml/lxml.etree.c:70569)
File "parser.pxi", line 1828, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:106403)
File "parser.pxi", line 1716, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:105194)
File "parser.pxi", line 1086, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:99876)
File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94350)
File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95786)
File "parser.pxi", line 631, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:95065)
XMLSyntaxError: None
[2015-10-21 15:11:54,262: INFO/MainProcess] Task convert[47ad2b19-b766-4458-8cd1-3f1459441ad8] succeeded in 0.967212782001s: {u'epub:174c40f1-ed04-4d01-a700-f5bc6ab309ff': }
[2015-10-21 15:11:54,374: INFO/MainProcess] Task booktype.apps.edit.tasks.publish_book[4124adbb-7526-46a8-96d2-90f5081e0314] succeeded in 1.105724427s: None
Is this likely a bug or configuration issue?
Thanks in advance.
It looks like you're new here. If you want to get involved, click one of these buttons!