Fix bug in dx_build_report_html arising introduced in Python 3 refactoring