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] Rich not playing nice when called from Reticulate #3416

Closed
2 tasks done
jucor opened this issue Jul 6, 2024 · 4 comments
Closed
2 tasks done

[BUG] Rich not playing nice when called from Reticulate #3416

jucor opened this issue Jul 6, 2024 · 4 comments

Comments

@jucor
Copy link

jucor commented Jul 6, 2024

Hi!

When called from the "Call-python-from-R" package Reticulate, Rich progress bars display incorrectly:
image

I've opened a bug report at Reticulate, with full description and minimum code example: rstudio/reticulate#1632

I realise this is likely some Reticulate wizardry (they remap stdout to R's console) that might be an issue, hence the bug report there, but I figured the kind developers will know much, much more about what to expect from a console, and how to get compatibility :)

Thanks a lot for any help!

@jucor
Copy link
Author

jucor commented Jul 8, 2024

I have found the root cause: Rstudio Console does not support cursor motion ANSI control sequences. I have opened a feature request upstream in rstudio/rstudio#14942 , as well as a bug report for an associated issue rstudio/rstudio#14941 .

Is there a way to make Rich progressbars working even without cursor motion control sequences, even if in a much simpler capacity?

@Textualize Textualize deleted a comment from github-actions bot Jul 8, 2024
@willmcgugan
Copy link
Collaborator

I don't think there is much that can be don't if Reticulate doesn't support escape sequences. They clearly support the escape sequences for color, so fingers crossed they will support more...

Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

@jucor
Copy link
Author

jucor commented Aug 26, 2024

They support a subset, e.g. backspace. What they don't support is other movement :/

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