2

I'm running into an issue on RStudio (1.4) where I cannot see Python documentation in the Help Panel. I'm using reticulate v. 1.20 and my Python interpreter is working fine. But if I use the F1 keyboard shortcut or run e.g., ?np.random.rand I get the following error:

>>> ?np.random.rand
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function

The Help panel reads: /python/np.random.rand.html not found

Haven't seen this issue anywhere else.

Phil
  • 7,287
  • 3
  • 36
  • 66
Will Hipson
  • 366
  • 2
  • 9

2 Answers2

2

This seems to be fixed in the development version of reticulate which can be installed as follows:

devtools::install_github("rstudio/reticulate")

Will Hipson
  • 366
  • 2
  • 9
0

Does that feature exist with reticulate? There is an in-built function to request help: py_help - https://rdrr.io/github/rstudio/reticulate/man/py_help.html e.g. the following boots up a help file for me

library(reticulate)
os <- import("os")
py_help(os$listdir)
Jonny Phelps
  • 2,687
  • 1
  • 11
  • 20
  • Documentation for `reticulate` describes using F1 to display help https://rstudio.github.io/reticulate/articles/rstudio_ide.html – Will Hipson Jun 22 '21 at 14:59
  • Ah my mistake I only spotted the `?np.random.rand` part sorry. You might get further posting this on their Github page if no one can help you here – Jonny Phelps Jun 22 '21 at 15:16
  • 1
    Thanks, there's an issue there addressing this https://github.com/rstudio/reticulate/issues/1011. Fixed it by installing the development version: `devtools::install_github("rstudio/reticulate")` – Will Hipson Jun 22 '21 at 15:34
  • Sounds like this comment should be posted as an answer @WillHipson? I just ran into the same issue and the dev version (1.20) also resolved it for me. – RTbecard Jul 09 '21 at 08:39