Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] traceback not captured #3544

Closed
2 tasks done
juneleung opened this issue Oct 30, 2024 · 4 comments
Closed
2 tasks done

[BUG] traceback not captured #3544

juneleung opened this issue Oct 30, 2024 · 4 comments

Comments

@juneleung
Copy link

Describe the bug

I tried to add the from rich.traceback import install in the code and run with os.system(), traceback error not be captured and shown in rich colorize display. as shown:
image

I tried to run an error code like try a not existing function, the traceback displays perfectly.
image

How to make all the traceback colorized? Thanks!

Platform

Click to expand

Arch Linux, VSCode

python -m rich.diagnose
pip freeze | grep rich

image
image

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

The error is occurring in the command. There is no way for Rich to capture a traceback from a different process. Can you not add the traceback handler to your train module?

@juneleung
Copy link
Author

It works!
Grateful!

Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants