Skip to content

"lxml.etree.ParserError: Document is empty" with demo content #3679

Open
@IliaOzhmegov

Description

Environment

Python Version:
3.10 and 3.11

Nikola Version:
8.2.3

Operating System:
macOS Ventura (13.2.1)

Description:

> nikola build
Scanning posts........done!
.  render_taxonomies:output/archive.html
.  render_taxonomies:output/authors/index.html
.  render_taxonomies:output/categories/index.html
.  render_taxonomies:output/ru/archive.html
.  render_taxonomies:output/ru/authors/index.html
.  render_taxonomies:output/ru/categories/index.html
.  copy_assets:output/assets/css/theme.css
.  copy_assets:output/assets/css/nikola_rst.css
.  copy_assets:output/assets/css/nikola_ipython.css
.  copy_assets:output/assets/css/html4css1.css
.  copy_assets:output/assets/css/rst.css
.  copy_assets:output/assets/css/ipython.min.css
.  copy_assets:output/assets/css/rst_base.css
.  copy_assets:output/assets/css/baguetteBox.min.css
.  copy_assets:output/assets/js/html5.js
.  copy_assets:output/assets/js/fancydates.js
.  copy_assets:output/assets/js/gallery.min.js
.  copy_assets:output/assets/js/fancydates.min.js
.  copy_assets:output/assets/js/gallery.js
.  copy_assets:output/assets/js/baguetteBox.min.js
.  copy_assets:output/assets/js/html5shiv-printshiv.min.js
.  copy_assets:output/assets/js/justified-layout.min.js
.  copy_assets:output/assets/js/luxon.min.js
.  copy_assets:output/assets/xml/atom.xsl
.  copy_assets:output/assets/xml/rss.xsl
.  copy_assets:output/assets/css/code.css
.  render_listings:output/listings/index.html
TaskError - taskid:render_listings:output/listings/index.html
PythonAction Error
Traceback (most recent call last):
  File "/Users/iliaozhmegov/Projects/2.Blog/.venv/lib/python3.10/site-packages/doit/action.py", line 461, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/Users/iliaozhmegov/Projects/2.Blog/.venv/lib/python3.10/site-packages/nikola/plugins/task/listings.py", line 178, in render_listing
    self.site.render_template('listing.tmpl', out_name, context)
  File "/Users/iliaozhmegov/Projects/2.Blog/.venv/lib/python3.10/site-packages/nikola/nikola.py", line 1509, in render_template
    doc = lxml.html.document_fromstring(data.strip(), parser)
  File "/Users/iliaozhmegov/Projects/2.Blog/.venv/lib/python3.10/site-packages/lxml/html/__init__.py", line 761, in document_fromstring
    raise etree.ParserError(
lxml.etree.ParserError: Document is empty

########################################
render_listings:output/listings/index.html <stdout>:

The same issue as the following:

  1. "lxml.etree.ParserError: Document is empty" with demo content #3663
  2. TaskError - taskid:render_taxonomies:output/archive.html ... lxml.etree.ParserError: Document is empty #3507
  3. lxml.etree.ParserError: Document is empty #2851

There is something wrong with emoji in that theme

so I "fixed" it by replacing bootblog4 with base in conf.py. And on top of that in base/templates/gallery.tmpl I replaced 📂 with &#x1f4c2 (according to the #3663)

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions