Skip to content

Commit

Permalink
Fix UnicodeEncodeError when writing HTML report
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Jan 22, 2021
1 parent c7619bd commit cb56d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def sig_term_handler():
main_greenlet.join()
if options.html_file:
html_report = get_html_report(environment, show_download_link=False)
with open(options.html_file, "w+") as file:
with open(options.html_file, "w", encoding="utf-8") as file:
file.write(html_report)
shutdown()
except KeyboardInterrupt:
Expand Down

0 comments on commit cb56d64

Please sign in to comment.