diff --git a/plugins/talks.py b/plugins/talks.py index 2026602..d3950e5 100644 --- a/plugins/talks.py +++ b/plugins/talks.py @@ -307,8 +307,10 @@ class TalksGenerator(generators.Generator): if os.path.isdir(outdir): shutil.rmtree(outdir) shutil.copytree(self.talks[talkname]['resources'], outdir) - with open(os.path.join(self.output_path, TALK_ICS), 'w') as buf: - buf.write(talks_to_ics().encode('utf8')) + with io.open(os.path.join(self.output_path, TALK_ICS), + 'w', + encoding='utf8') as buf: + buf.write(talks_to_ics()) def add_talks_option_defaults(pelican):