Project

General

Profile

Feature #2597

Feature #2461: Add Berean Study Bible

Export fails

Added by Luke Murphey almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/10/2020
Due date:
% Done:

100%

Associated revisions

Revision 1073 (diff)
Added by luke.murphey almost 5 years ago

Fixing error that prevents epub export

Reference #2597

Revision 1074 (diff)
Added by luke.murphey almost 5 years ago

Adding test for epub creation

Reference #2597

Revision 1077 (diff)
Added by luke.murphey almost 5 years ago

Fixing export problems

Reference #2597

History

#1 Updated by Luke Murphey almost 5 years ago

Internal Server Error: /download/work/berean-bible
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/src/app/reader/views.py", line 372, in download_work
    fname = ePubExport.exportWork(work, epub_file_full_path)
  File "/usr/src/app/reader/ebook/__init__.py", line 297, in exportWork
    new_division = cls.exportDivision(book, division, division_parents[-1])
  File "/usr/src/app/reader/ebook/__init__.py", line 423, in exportDivision
    html = template.render(c).encode("utf-8")
  File "/usr/local/lib/python3.7/site-packages/django/template/backends/django.py", line 66, in render
    return self.template.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 207, in render
    return self._render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 177, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 72, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 1040, in render
    output = self.filter_expression.resolve(context)
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 736, in resolve
    new_obj = func(obj, *arg_vals)
  File "/usr/src/app/reader/templatetags/string_utils.py", line 89, in replace
    return value.replace(replace_this, put_in_this)
AttributeError: 'Division' object has no attribute 'replace'
Qs: Obs:
  • Calling str on the object doesn't fix it
  • I'm guessing the str function is returning the actual division somehow
  • Removing the str function from the Division model doesn't fix it
Options:
  • Division model is not returning a str from str
    • Removing str changed the behavior
  • Which part of the str branch has the issue?
    • None are having issues now
    • However, the division titles are wrong
  • I'm using the template engine wrong

#2 Updated by Luke Murphey almost 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF