replace usage of `sys.stdout.encoding` with `sys.getdefaultencoding()`
In some environments, `sys.stdout.encoding` may return `None`.
This is encountered when knitting an rmarkdown document using the reticulate engine. In that context, `sys.stdout` is replaced with a `StringIO()` object to capture all output. `StringIO().encoding` returns `None`
closes https://github.com/rstudio/reticulate/issues/1508
正在显示
请
注册
或者
登录
后发表评论