-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
Description
I'm trying to run python -m towncrier.check --pyproject towncrier.pyproject.toml from GitHub Actions steps, and towncrier fails in this manner:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/2.7.17/x64/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/hostedtoolcache/Python/2.7.17/x64/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 98, in <module>
_main()
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 31, in _main
return __main(compare_with, directory, pyproject)
File "/home/runner/work/tahoe-lafs/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 44, in __main
.decode(getattr(sys.stdout, "encoding", "utf8"))
TypeError: decode() argument 1 must be string, not None
That sys.stdout.encoding is set to None seems to be a GitHub Actions quirk, because this doesn't happen in TravisCI or CircleCI.
It happens on all three GA setups (Windows, macOS, Ubuntu) I tried.
More here: https://github.com/sajith/tahoe-lafs/runs/462170050#step:9:22.
Reactions are currently unavailable