Skip to content

Commit

Permalink
more utf-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Mar 8, 2022
1 parent 3b50970 commit 55015c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ploomber/tasks/notebook.py
Expand Up @@ -430,7 +430,7 @@ def develop(self, app='notebook', args=None):
name_new = name.replace(suffix, '-tmp.ipynb')
tmp = self.source.loc.with_name(name_new)
content = nbformat.writes(nb, version=nbformat.NO_CONVERT)
tmp.write_text(content)
tmp.write_text(content, encoding='utf-8')

# open notebook with injected debugging cell
try:
Expand Down Expand Up @@ -500,7 +500,7 @@ def debug(self, kind='ipdb'):
fd, tmp_path = tempfile.mkstemp(suffix='.py')
os.close(fd)
code = jupytext.writes(nb, version=nbformat.NO_CONVERT, fmt='py')
Path(tmp_path).write_text(code)
Path(tmp_path).write_text(code, encoding='utf-8')

if kind == 'pm':
# post-mortem debugging
Expand Down Expand Up @@ -548,7 +548,7 @@ def run(self):
os.close(fd)

tmp = Path(tmp)
tmp.write_text(self.source.nb_str_rendered)
tmp.write_text(self.source.nb_str_rendered, encoding='utf-8')

if self.local_execution:
self.papermill_params['cwd'] = str(self.source.loc.parent)
Expand Down

0 comments on commit 55015c5

Please sign in to comment.