Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding mail flag to stats_report.py results in Unicode error #1065

Open
dwe2e opened this issue Sep 21, 2023 · 1 comment
Open

Adding mail flag to stats_report.py results in Unicode error #1065

dwe2e opened this issue Sep 21, 2023 · 1 comment

Comments

@dwe2e
Copy link

dwe2e commented Sep 21, 2023

When calling stats.py, works fine with the date parameters, when adding the mail (-m) flag, results in the following error:

Traceback (most recent call last):
File "/var/www/MISP/PyMISP/examples/stats_report.py", line 405, in
print_report(report_body, attachments, smtp_from, smtp_to, smtp_server, misp_url)
File "/var/www/MISP/PyMISP/examples/stats_report.py", line 312, in print_report
server.sendmail(smtp_from, smtp_to, msg.as_string())
File "/usr/lib/python3.10/smtplib.py", line 875, in sendmail
msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 143201-143203: ordinal not in range(128)

@Rafiot
Copy link
Member

Rafiot commented Oct 20, 2023

Just making sure, which version or python are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants