laws-africa / peachjam

Project Peach Jam
https://agp.africanlii.org
GNU General Public License v3.0
2 stars 0 forks source link

AttributeError: 'NoneType' object has no attribute 'encode' #1863

Closed sentry-io[bot] closed 2 months ago

sentry-io[bot] commented 3 months ago

Sentry Issue: LII-1MX

AttributeError: 'NoneType' object has no attribute 'encode'
(1 additional frame(s) were not displayed)
...
  File "peachjam/tasks.py", line 153, in extract_citations
    if doc.extract_citations():
  File "peachjam/models/core_document_model.py", line 579, in extract_citations
    self.delete_citations()
  File "peachjam/models/journals_books.py", line 16, in delete_citations
    self.convert_content_markdown()
  File "peachjam/models/journals_books.py", line 19, in convert_content_markdown
    self.content_html = markdownify(self.content_markdown)
  File "peachjam/helpers.py", line 92, in markdownify
    inf.write(text.encode("utf-8"))