openzim / openedx

Open edX (to zim) scraper
GNU General Public License v3.0
8 stars 7 forks source link

Zimfarm run failure due to link rewriting issue #99

Closed satyamtg closed 4 years ago

satyamtg commented 4 years ago

The zimfarm run https://farm.openzim.org/pipeline/5f2c4ffe2a0cfbdda0a2e455/debug failed with the following -

  File "libzim/wrapper.pyx", line 121, in libzim.wrapper.blob_cy_call_fct
  File "/usr/local/lib/python3.8/site-packages/libzim/writer.py", line 88, in _get_data
    self._blob = self.get_data()
  File "/usr/local/lib/python3.8/site-packages/zimscraperlib/zim/filesystem.py", line 110, in get_data
    rewriter(self.fpath, root=self.root).encode("utf-8")
  File "/usr/local/lib/python3.8/site-packages/zimscraperlib/zim/rewriting.py", line 187, in fix_links_in_html_file
    return fix_links_in_html(url, fh.read())
  File "/usr/local/lib/python3.8/site-packages/zimscraperlib/zim/rewriting.py", line 157, in fix_links_in_html
    fixed = fix_target_for(
  File "/usr/local/lib/python3.8/site-packages/zimscraperlib/zim/rewriting.py", line 97, in fix_target_for
    flat_target = flat_target.resolve().relative_to(root.resolve())
  File "/usr/local/lib/python3.8/pathlib.py", line 904, in relative_to
    raise ValueError("{!r} does not start with {!r}"
ValueError: '/favicon.png' does not start with '/output'

This looks like an issue somewhere in the templates