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

httpgd no longer working in radian #446

Closed
uhkeller opened this issue Nov 13, 2023 · 11 comments · Fixed by #451
Closed

httpgd no longer working in radian #446

uhkeller opened this issue Nov 13, 2023 · 11 comments · Fixed by #451

Comments

@uhkeller
Copy link

uhkeller commented Nov 13, 2023

Recently, httpgd devices have stopped working in radian R sessions, while continuing to work just fine in a normal R session.

Steps to reproduce

Start radian

Run httpgd::hgd() and open the supplied URL.

Generate a plot, for example with plot(rnorm(100)).

In the browser window, the thumbnail of the generated plot is displayed, but the actual plot area stays empty. Subsequent plotting commands have no effect at all. Quitting the radian R session using q() does not work, the session hangs.

Other info

In a standard R session everything works just fine.

I'm using R 4.3.2 on macOS 13.6, radian version 0.6.8, Python 3.11.6. httpgd: current HEAD on GitHub and version 1.3.1.

Other Python packages:

rchitect 0.4.4
prompt-toolkit 3.0.40
pygments 2.16.1
wcwidth 0.2.9
cffi 1.16.0
six 1.16.0
pycparser 2.21

@memeplex
Copy link

memeplex commented Nov 13, 2023

I downgraded to radian==0.6.6 with rchitect==0.3.39 but it is the same.

I had upgraded my venv last weekend and the issue probably started happening at that point, because I remember having used httpgd with radian just fine last week.

@uhkeller uhkeller changed the title httpgd no longer workin in radian httpgd no longer working in radian Nov 14, 2023
@benz0li
Copy link

benz0li commented Nov 17, 2023

The problem is prompt-toolkit ≥ 3.0.40. Downgrade to prompt-toolkit==3.0.39 and it works again.

Ping @jonathanslenders

@benz0li
Copy link

benz0li commented Nov 17, 2023

The diff from 3.0.39 to 3.0.40: prompt-toolkit/python-prompt-toolkit@490cf90...b6a9f05

@randy3k Any idea what could have caused this? Maybe prompt-toolkit/python-prompt-toolkit@27cb5c0?

@benz0li
Copy link

benz0li commented Nov 17, 2023

Ping @renkun-ken as the R Extension for Visual Studio Code recommends the use of radian and httpgd.

@acser00
Copy link

acser00 commented Nov 17, 2023

I had a similar issue of rendering plots using httpgd. I am using macOS 13.6, R 4.3.1, and radian 0.6.8. Downgrading to prompt-toolkit==3.0.39 using pip install --force-reinstall prompt-toolkit==3.0.39 has solved this issue on my system.

@randy3k
Copy link
Owner

randy3k commented Nov 17, 2023

Oh, good find. Let me check wha
T they have changed.

@randy3k
Copy link
Owner

randy3k commented Nov 17, 2023

Looks like 3.0.41 has a fix for Ipython. Though it doesn't work for us.

prompt-toolkit/python-prompt-toolkit@8c60193

benz0li added a commit to b-data/jupyterlab-r-docker-stack that referenced this issue Nov 18, 2023
benz0li added a commit to b-data/r-docker-stack that referenced this issue Nov 18, 2023
@memeplex
Copy link

I've upgraded to 3.0.41 and the problem persists. Downgrading to 3.0.39 fixed it.

@pehkawn
Copy link

pehkawn commented Dec 1, 2023

I've upgraded to 3.0.41 and the problem persists. Downgrading to 3.0.39 fixed it.

Can confirm this worked. In addition to downgrading to prompt-tookit 3.0.39, I had to downgrade radian to v 0.6.7 for compatibility.

@randy3k
Copy link
Owner

randy3k commented Dec 2, 2023

The current version of radian should be compatible with the new version of prompt-toolkit.

@benz0li
Copy link

benz0li commented Dec 2, 2023

The current version of radian should be compatible with the new version of prompt-toolkit.

I can confirm that it works with the latest versions of radian (currently v0.6.9) and prompt-tookit (currently v3.0.41).

This can be verified by anyone with a GitHub account on my reference deployment at https://demo.jupyter.b-data.ch.

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 a pull request may close this issue.

6 participants