#8369 1.12.0 docker quick start missing html2txt on import tickets


I followed the steps in the quick start using Docker with v1.12.0. When attempting to import tickets from a Trac instance, it fails on the first ticket because html2txt is missing:

taskd_1    | 02:07:35,780 ERROR [allura.model.monq_model] Error "No module named html2text" on job <MonQTask 5efa9e65ce4255000e906119 (busy) P:10 forgeimporters.base.import_tool e43dd4538791 pid 1 project:/p/exe/ app:admin user:jtittsler>
taskd_1    | Traceback (most recent call last):
taskd_1    |   File "/allura/Allura/allura/model/monq_model.py", line 260, in __call__
taskd_1    |     self.result = func(*self.args, **self.kwargs)
taskd_1    |   File "/allura/ForgeImporters/forgeimporters/base.py", line 131, in import_tool
taskd_1    |     mount_point=mount_point, mount_label=mount_label, **kw)
taskd_1    |   File "/allura/ForgeImporters/forgeimporters/trac/tickets.py", line 119, in import_tool
taskd_1    |     json.dumps(export(trac_url), cls=DateJSONEncoder),
taskd_1    |   File "/allura/Allura/allura/scripts/trac_export.py", line 308, in export
taskd_1    |     doc = [t for t in islice(ex, limit)]
taskd_1    |   File "/allura/Allura/allura/scripts/trac_export.py", line 288, in next
taskd_1    |     return self.get_ticket(id, extra)
taskd_1    |   File "/allura/Allura/allura/scripts/trac_export.py", line 235, in get_ticket
taskd_1    |     t = self.parse_ticket(id)
taskd_1    |   File "/allura/Allura/allura/scripts/trac_export.py", line 159, in parse_ticket
taskd_1    |     import html2text
taskd_1    | ImportError: No module named html2text


  • Dave Brondsema

    Dave Brondsema - 2020-06-30


    I believe you can fix that by running docker-compose run web pip install -e git://github.com/brondsem/html2text.git#egg=html2text and then docker-compose restart web taskd The html2text package isn't installed by default because it has a GPL license and Apache projects make releases only with Apache and similar licenses. You are free to install the GPL library though.

    The error message probably should be better, although the Trac import isn't used a lot, so its probably not encountered much.

    Lastly, I work at SourceForge and noticed a few days ago a trac import failed, I think it was probably you and the "eXe" project? 😄 It seems like an unexpected formatting/parsing issue on some attachment info, but haven't digged in deeper than that. Likely due to an older or newer Trac version than the Allura import code was originally writen for. Like I said it hasn't been used a lot, so may need some tweaks.


  • Dave Brondsema

    Dave Brondsema - 2021-05-17
    • status: open --> closed
    • Milestone: unreleased --> v1.13.0

Log in to post a comment.