Repository: holoviz/holoviews

Issue:
hv.help errors on object created using hvplot: AttributeError: 'NoneType' object has no attribute 'registry'
I'm trying to add tooltips for hvplot in https://github.com/holoviz/hvplot/issues/789. As a part of would like to use `hv.help` to demonstrate how easy it is to drop into HoloViews for more power and flexibility. But it seems its not that easy.

```python
import pandas as pd, numpy as np
import hvplot.pandas

idx = pd.date_range('1/1/2000', periods=1000)
df  = pd.DataFrame(np.random.randn(1000, 4), index=idx, columns=list('ABCD')).cumsum()
curves = df.hvplot()

import holoviews as hv
hv.extension("bokeh")
hv.help(curves)
```

```bash
$ python 'script.py'
Traceback (most recent call last):
  File "script.py", line 10, in <module>
    hv.help(curves)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\__init__.py", line 81, in help
    recursive=recursive, pattern=pattern, elements=elements_list)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\core\options.py", line 1239, in info
    pattern=pattern, elements=elements)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\core\pprint.py", line 144, in info
    backend_registry = cls.store.registry.get(backend, {})
AttributeError: 'NoneType' object has no attribute 'registry'
```

I'm on the main branch of hvPlot and just installed latest version of HoloViews.


Discussion:
I'm on the master branch of these two libraries and cannot reproduce this error, either by running the code in a notebook or as a script.
I cannot reproduce the issue. Feel free to open it if you are still having this problem.
This is old and maybe no longer relevant, but I've been struggling with this issue, the problem appears to be a missing dependency that comes with JupyterLabs, which I assume basically everyone normally installs and is why this wasn't able to be reproduced. I discovered this from the most recent reply on the following stack overflow post: 

https://stackoverflow.com/questions/65191364/how-to-view-opts-for-holoviews-with-bokeh-in-python?newreg=782928f68c4d4bc994a07640ac4e6e48

I've been able to reproduce by starting a fresh env in python 3.9.7, installing holoviews 1.15.4, or 1.18 only via pip, and running the imports, set backend, and help command as done in the original question. Then installing jupterlab fixes the issue, but only on 1.15.4, it persists on 1.18 at least on python 3.9. 
I can confirm I always get this error within a Python console. I don't have jupyterlab installed in my environments.
I also encountered this problem, and a quick workaround:

add `InfoPrinter.store=cls` inside `Store.info` function before call `InfoPrinter.info`

When `InfoPrinter.store` init normally? I only found default value `None`

Resolving patch:
diff --git a/holoviews/core/options.py b/holoviews/core/options.py
--- a/holoviews/core/options.py
+++ b/holoviews/core/options.py
@@ -1253,7 +1253,7 @@ def info(cls, obj, ansi=True, backend='matplotlib', visualization=True,
         parameterized_class = (isinstance(obj,type)
                                and  issubclass(obj,param.Parameterized))
         info = None
-        if parameterized_object or parameterized_class:
+        if InfoPrinter.store and (parameterized_object or parameterized_class):
             info = InfoPrinter.info(obj, ansi=ansi, backend=backend,
                                     visualization=visualization,
                                     pattern=pattern, elements=elements)


Test patch:
diff --git a/holoviews/tests/util/test_help.py b/holoviews/tests/util/test_help.py
--- a/holoviews/tests/util/test_help.py
+++ b/holoviews/tests/util/test_help.py
@@ -9,3 +9,15 @@ def test_help_pattern(capsys):
     hv.help(hv.Curve, pattern='border')
     captured = capsys.readouterr()
     assert '\x1b[43;1;30mborder\x1b[0m' in captured.out
+
+
+@pytest.mark.usefixtures("bokeh_backend")
+def test_help_pattern_no_ipython(capsys):
+    info_store = hv.core.pprint.InfoPrinter.store
+    try:
+        hv.core.pprint.InfoPrinter.store = None
+        hv.help(hv.Curve)
+        captured = capsys.readouterr()
+        assert captured.out.startswith('Help on class Curve')
+    finally:
+        hv.core.pprint.InfoPrinter.store = info_store