Skip to content

[BUG] Fix redirecting traceback from stderr to a file#563

Merged
computron merged 1 commit intomaterialsproject:mainfrom
ikondov:traceback-redirect-stderr
Mar 5, 2026
Merged

[BUG] Fix redirecting traceback from stderr to a file#563
computron merged 1 commit intomaterialsproject:mainfrom
ikondov:traceback-redirect-stderr

Conversation

@ikondov
Copy link
Contributor

@ikondov ikondov commented Dec 16, 2025

Closes #562

Summary

Major changes:

  • fix 1: Return the file handles from context manager
  • fix 2: Pass the stderr file handle as argument so that the traceback function is called with it

Todos

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@ikondov ikondov changed the title [BUG]: Fix redirecting traceback from stderr to a file [BUG] Fix redirecting traceback from stderr to a file Mar 2, 2026
@computron computron merged commit a3a49fa into materialsproject:main Mar 5, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

[Bug]: local redirect of stderr does not work in jupyter

2 participants